pesar pesar - 1 month ago 4
PHP Question

Can anyone get access to my PHP source code?

Is it possible to hide the .php file on the server...?

I have a website which sometimes calls php files inside iframes, now I wouldn't like it if somebody copied that code, so how would I hide it?
Or do I have to encrypt it?

Speed is a huge matter in my case, so anything that doesn't affect performance is appreciated!

Thanks

Answer

With a correctly configured web server, the PHP code isn't visible to your website visitors. For the PHP code to be accessible by people who visit your website, the server would have to be configured to display it as text instead of processing it as PHP code.

So, in other words, if you visit your website and you see a HTML page and not PHP code, your server is working correctly and no one can get to the PHP code.