note 85207 added to function.highlight-file
| From: | W at osu1 dot php dot net | Date: | Wed, 20 Aug 2008 09:43:44 +0000 |
| Subject: | note 85207 added to function.highlight-file | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-143675@lists.php.net to get a copy of this message | ||
Normally I add highlighting for files like so:
In every file that should be higlighted:
<?php
$tool_file=$_SERVER['SCRIPT_FILENAME']; $tool_file=basename($tool_file);
include_once('highlight.inc.php');
showCode();
?>
And in highlight.inc.php (or your init file):
<?php
function showCode() {
if ($_REQUEST['codeShow'] == 1) {
highlight_file($codeName);
exit ();
}
}
?>
When a user will open the sourcecode (or you'll link to it) he just adds ?codeShow=1 to the
filename.
----
Server IP: 217.160.72.57
Probable Submitter: 77.188.217.103
----
Manual Page -- http://www.php.net/manual/en/function.highlight-file.php
Edit -- https://master.php.net/note/edit/85207
Del: integrated -- https://master.php.net/note/delete/85207/integrated
Del: useless -- https://master.php.net/note/delete/85207/useless
Del: bad code -- https://master.php.net/note/delete/85207/bad+code
Del: spam -- https://master.php.net/note/delete/85207/spam
Del: non-english -- https://master.php.net/note/delete/85207/non-english
Del: in docs -- https://master.php.net/note/delete/85207/in+docs
Del: other reasons-- https://master.php.net/note/delete/85207
Reject -- https://master.php.net/note/reject/85207
Search -- https://master.php.net/manage/user-notes.php