Jump to content

Script source instead of Web page


stockton

Recommended Posts

If its a localhost URL and you see PHP code it's because the PHP interpreter engine is not parsing the code.  However, that is not the correct or default action that should occur.

 

If the PHP Interpreter engine is not running on the localhost machine and you try to view a PHP script in a browser (on the localhost machine), the browser should attempt a file download, which is the default action for any mime type the browser does not have an association for.  If however PHP is displayed as code in the browser, I would think that the PHP file type extension is probably set to open with the browser on the localhost machine.

 

If were talking about an HTTP web site (non-localhost) and you are able to view the PHP code of script on a web site then it could be something as simple as the author of the script using show_source();

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.