chrstrbrts
Senior member
Hi,
I have used the 'view source' option on chrome (I assume all browsers have similar functionality) to view source code for sites that are clearly dynamic.
However, I've noticed a conspicuous absence of PHP code in the HTML that is generated despite the fact that these sites show .php in the address bar when the browser generates their pages.
I see HTML (of course), CSS, and JavaScript.
But no PHP, Perl, or Python and by extension, no SQL.
It seems that the server scripting is removed before the code is presented to the user.
How and why is this done?
I'm assuming that despite the user not being able to see the server scripting, the browser can, right?
Thanks.
P.S.
I'm still new to all of this, but I do believe that you have the option of inbedding the HTML inside of PHP scripts.
In theory, your entire web page could be incoded within one PHP script.
In such a case, if you attempted to use the 'view source' tool, would you just get an empty page back?
I have used the 'view source' option on chrome (I assume all browsers have similar functionality) to view source code for sites that are clearly dynamic.
However, I've noticed a conspicuous absence of PHP code in the HTML that is generated despite the fact that these sites show .php in the address bar when the browser generates their pages.
I see HTML (of course), CSS, and JavaScript.
But no PHP, Perl, or Python and by extension, no SQL.
It seems that the server scripting is removed before the code is presented to the user.
How and why is this done?
I'm assuming that despite the user not being able to see the server scripting, the browser can, right?
Thanks.
P.S.
I'm still new to all of this, but I do believe that you have the option of inbedding the HTML inside of PHP scripts.
In theory, your entire web page could be incoded within one PHP script.
In such a case, if you attempted to use the 'view source' tool, would you just get an empty page back?
Last edited: