note 64461 added to function.highlight-file
| From: | gmail at diogo86 | Date: | Fri, 14 Apr 2006 19:39:38 +0000 |
| Subject: | note 64461 added to function.highlight-file | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-108103@lists.php.net to get a copy of this message | ||
I have a directory for some script testing and it is pretty useful to have its source code shown at
runtime. Then I made this:
append.php
<?php
echo "<hr />";
echo "<code><strong>Source code of
{$_SERVER['PHP_SELF']}</strong></code>";
echo " (<a href=\\"http://my.external.url{$_SERVER['REQUEST_URI']}\\">link</a>)
<br />";
highlight_file($_SERVER['SCRIPT_FILENAME']);
?>
And configured the .htaccess for this directory:
php_value auto_append_file "/home/diogo86/public_html/testing/append.php"
If for some reason a script can't have its source appended (such as a xml output) you can call
exit() at the end of your script to ensure the file won't be included.
----
Server IP: 66.163.161.117
Probable Submitter: 201.32.225.102 (proxied: 192.168.254.86)
----
X-Spam-Status: No, hits=4.0 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER,
HTML_20_30,HTML_MESSAGE autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.highlight-file.php
Edit -- http://master.php.net/note/edit/64461
Del: integrated -- http://master.php.net/note/delete/64461/integrated
Del: useless -- http://master.php.net/note/delete/64461/useless
Del: bad code -- http://master.php.net/note/delete/64461/bad+code
Del: spam -- http://master.php.net/note/delete/64461/spam
Del: non-english -- http://master.php.net/note/delete/64461/non-english
Del: in docs -- http://master.php.net/note/delete/64461/in+docs
Del: other reasons-- http://master.php.net/note/delete/64461
Reject -- http://master.php.net/note/reject/64461
Search -- http://master.php.net/manage/user-notes.php