Jump to content

How to print the contents of a php script from another script


cranberry13

Recommended Posts

Thanks CoolDude,

Another question for you -- the both scripts (the caller and the callee) are under a  htpasswd protected folder. When I used showsource in the program both with and without the http I got the following error:

 

Warning: show_source(http://www.mydomain.com/admin/display.php?id=24): failed to open stream: HTTP request failed! HTTP/1.1 401 Authorization Required in /home/myuser/public_html/admin/submit.php on line 41

 

 

What do you suggest?

the chmod would require the "public" to view the file so set chmod(0777) on it

 

this should only be used for viewing purposes (not any html purposes), if you are trying to show source code in a page for tutorial purposes use it as a separate file and say highlight_file($file_to_show) where file to show isn't the parent doc but the one you wish to be displayed.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.