note 77189 added to function.highlight-file
| From: | thinbeginatunmannedshipdotcom at osu1 dot php dot net | Date: | Sun, 19 Aug 2007 05:45:01 +0000 |
| Subject: | note 77189 added to function.highlight-file | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-129588@lists.php.net to get a copy of this message | ||
i much prefer to use the .phps extension for showing highlighted source. all you have to do is type
"cp example.php example.phps" at the command line.
on the flip side, for easy dynamic source sharing, it's as simple as:
<?php
if (!isset($_GET['file']) || trim($_GET['file']) == '') {
echo 'please pass me something yummy';
die(0);
}
if (!file_exists($_GET['file'])) {
echo "<b>{$_GET['file']}</b> does not seem to exist :(";
die(0);
}
highlight_file($_GET['file']);
?>
----
Server IP: 209.41.74.194
Probable Submitter: 70.57.95.218
----
Manual Page -- http://www.php.net/manual/en/function.highlight-file.php
Edit -- https://master.php.net/note/edit/77189
Del: integrated -- https://master.php.net/note/delete/77189/integrated
Del: useless -- https://master.php.net/note/delete/77189/useless
Del: bad code -- https://master.php.net/note/delete/77189/bad+code
Del: spam -- https://master.php.net/note/delete/77189/spam
Del: non-english -- https://master.php.net/note/delete/77189/non-english
Del: in docs -- https://master.php.net/note/delete/77189/in+docs
Del: other reasons-- https://master.php.net/note/delete/77189
Reject -- https://master.php.net/note/reject/77189
Search -- https://master.php.net/manage/user-notes.php