note 71242 deleted from function.highlight-file by tularis
| From: | tularis@php.net | Date: | Sat, 18 Nov 2006 19:55:32 +0000 |
| Subject: | note 71242 deleted from function.highlight-file by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-119857@lists.php.net to get a copy of this message | ||
Note Submitter: sasimon19 at gmail dot com
----
If you would like to insert a php script into a document without hightlights and without executing
the script you would do the following:
//for windows
$fp = fopen($filename, "rb");
$file = fread($fp, filesize($filename));
fclose($fp);
$file = str_replace('&','&',$file);
$file = str_replace('<','<',$file);
$file = str_replace('>','>',$file);
$content = $file;
//for linux
$fp = fopen($filename, "r");
$file = fread($fp, filesize($filename));
fclose($fp);
$file = str_replace('&','&',$file);
$file = str_replace('<','<',$file);
$file = str_replace('>','>',$file);
$content = $file;