Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can a client view server-side PHP source code?

Tags:

I'm developing a PHP application that has to respond to request from several clients, and I thinks "Can any of the clients see the PHP code that I'm writing?".

like image 606
Lucas Gabriel Sánchez Avatar asked Oct 13 '09 23:10

Lucas Gabriel Sánchez


People also ask

Can the client see PHP code?

PHP is a server-side programming language, meaning it is executed at the web server before the website is sent to the end-user. This is why you can't see the PHP code when you view the source code.

Can PHP work on client side?

The PHP is not installed on the client side, it is only on the server side. Using <object> method I somehow managed to execute a PHP script on the client side. But it's just window or small frame that is visible on the current browser or in a page on the browser of a local machine (or client machine).

Does PHP run server-side or client side?

PHP is a server-side scripting language designed to be used for web purposes.

Does PHP code run on server or client?

PHP runs on the server and Javascript runs in client.


2 Answers

No, unless

  • There is a server misconfiguration
  • There is a bad echo/include somewhere
like image 156
Daniel A. White Avatar answered Oct 12 '22 03:10

Daniel A. White


No. Unless you're echoing it to them under where you're actually using it.

like image 21
gn22 Avatar answered Oct 12 '22 03:10

gn22