Security of PHP script, embedded or otherwise

Posted by typoknig on Stack Overflow See other posts from Stack Overflow or by typoknig
Published on 2010-04-20T22:12:43Z Indexed on 2010/04/20 22:33 UTC
Read the original article Hit count: 202

Filed under:
|
|

Hi all, I am curious about the security of PHP on an HTML webpage where PHP code is embedded (a webpage that would exist on the server as "webpage.php") or on a PHP script that may be referenced by an HTML page (that is, a PHP script that is not actually part of a webpage that exists on the server as "something.php" and is referenced by "webpage.html"). Getting to the point, let us say that if the source code of my PHP script is known by anyone it would be a very big problem. I know that when you view the source of a PHP page in a browser the PHP script is not shown, but what if the PHP server failed and the HTML still loaded (is this even possible), would a user be able to see the PHP script? To be more general, is there ANY possible way that a user could access the source of a PHP script from a web browser, and if so, how do I prevent it?

© Stack Overflow or respective owner

Related posts about php

Related posts about security