MoinMoin Logo
  • Comments
  • Immutable Page
  • Menu
    • Navigation
    • RecentChanges
    • FindPage
    • Local Site Map
    • Help
    • HelpContents
    • HelpOnMoinWikiSyntax
    • Display
    • Attachments
    • Info
    • Raw Text
    • Print View
    • Edit
    • Load
    • Save
  • Login

Navigation

  • Start
  • Sitemap
Revision 2 as of 2014-07-09 20:32:52
  • PHP

PHP

http://www.php.net/

syslog

Generate a system log message

   1 <?php
   2 // levels LOG_EMERG LOG_ALERT LOG_CRIT LOG_ERR  LOG_WARNING LOG_NOTICE  LOG_INFO LOG_DEBUG 
   3 syslog(LOG_INFO,'Hello here'); // In Slackware by default logs the message to /var/log/messages
   4 ?>

sprintf

Return a formatted string

   1 <?php
   2 echo sprintf('There are %d monkeys in the %s', 5, 'tree');
   3 ?>

str_replace

Replace all occurrences of the search string with the replacement string

   1 <?php
   2 // Returns <body text='black'>
   3 $bodytag = str_replace("%body%", "black", "<body text='%body%'>");
   4 ?>
  • MoinMoin Powered
  • Python Powered
  • GPL licensed
  • Valid HTML 4.01