note 34703 deleted from function.highlight-string by aidan

From: Date: Sun, 26 Sep 2004 13:46:38 +0000
Subject: note 34703 deleted from function.highlight-string by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-77365@lists.php.net to get a copy of this message
Note Submitter: Øyvind Nondal - oyvindnondal at hotmail dot com ---- This is a werry simple example of a non-database posting of highlighting code. /* * Save this to codes.php and start posting! * the codes will be saved into codes.php.snipplets * if some spamers do something you will need to edit the * codes.php.snipplets in notepad. Sorry for the bad english ;-) */ <? if ($code) { $code = ereg_replace( "\r\n\r\n", "\n", $code); $code = "$code"; $fp = fopen (basename($PHP_SELF) . ".snipplets", "a"); fwrite ($fp, highlight_string($code,1)); fwrite ($fp, ("<hr>")); fclose ($fp); } @readfile(basename(($PHP_SELF . ".snipplets"))); ?> <FORM method="post"> <b>Your code:</b><BR><TEXTAREA name="code" rows=10 cols=50 wrap=virtual> </TEXTAREA><BR> <INPUT name="submit" type="submit" value="Submit"> </FORM>

« previous php.notes (#77365) next »