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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.