note 71242 deleted from function.highlight-file by tularis

From: 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('&','&amp;',$file); $file = str_replace('<','&lt;',$file); $file = str_replace('>','&gt;',$file); $content = $file; //for linux $fp = fopen($filename, "r"); $file = fread($fp, filesize($filename)); fclose($fp); $file = str_replace('&','&amp;',$file); $file = str_replace('<','&lt;',$file); $file = str_replace('>','&gt;',$file); $content = $file;

« previous php.notes (#119857) next »