note 71242 added to function.highlight-file

From: Date: Sat, 18 Nov 2006 16:47:23 +0000
Subject: note 71242 added to function.highlight-file
Groups: php.notes 
Request: Send a blank email to php-notes+get-119854@lists.php.net to get a copy of this message
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; ---- Server IP: 64.71.164.2 Probable Submitter: 24.50.231.42 ---- Manual Page -- http://www.php.net/manual/en/function.highlight-file.php Edit -- https://master.php.net/note/edit/71242 Del: integrated -- https://master.php.net/note/delete/71242/integrated Del: useless -- https://master.php.net/note/delete/71242/useless Del: bad code -- https://master.php.net/note/delete/71242/bad+code Del: spam -- https://master.php.net/note/delete/71242/spam Del: non-english -- https://master.php.net/note/delete/71242/non-english Del: in docs -- https://master.php.net/note/delete/71242/in+docs Del: other reasons-- https://master.php.net/note/delete/71242 Reject -- https://master.php.net/note/reject/71242 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#119854) next »