show_source

(PHP 4, PHP 5, PHP 7)

show_sourceAlias of highlight_file()

Description

This function is an alias of: highlight_file().

add a note add a note

User Contributed Notes 2 notes

up
1
kapten dot mozac at gmail dot com
23 days ago
if show_source() won't work on your hosting, you can use file_get_contents()

<?php
   
echo "<pre>";
    echo
htmlentities(file_get_contents(__FILE__));
    echo
"</pre>";
?>

or combine it with highlight_string()

<?php
   
echo "<pre>";
    echo
htmlentities(highlight_string(file_get_contents(__FILE__)));
    echo
"</pre>";
?>
up
-25
edy at edy-b dot de
9 years ago
Show the source of the current file:

<?php
   
/* some code here */
   
   
show_source(__FILE__);   
?>
To Top