Today I uploaded a file to my server. Within that file I had echo file_get_contents('/anotherPage.php');
I was presuming that the method would only get the html of the document but the method not only returned my html. But my php source code as well!
If someone was to use this method on an external server to mine would my source code be visible?
How would I prevent someone viewing my php source code using the following methods: file_get_contents()
,fread()
,file_open()
and other similar methods.
I don't think I have access to the file php.ini
. So I can't disable the methods can I?
Anyway I'm not even sure the source code is visible on external servers :S