Warrior Forum - The #1 Digital Marketing Forum & Marketplace

Warrior Forum - The #1 Digital Marketing Forum & Marketplace (https://www.warriorforum.com/)
-   Programming (https://www.warriorforum.com/programming/)
-   -   Is It Possible To See PHP Files Through A Web Browser? (https://www.warriorforum.com/programming/135396-possible-see-php-files-through-web-browser.html)

howudoin 17th October 2009 11:44 PM

Is It Possible To See PHP Files Through A Web Browser?
 
Just wondering, If a site is running using several PHP files, then is it possible to see individual files through a web browser (Using Port 80).

Do I need to install any file for this on my web server or something?

Thanks in advance.:)

ValentinJed 18th October 2009 05:34 AM

Re: Is It Possible To See PHP Files Through A Web Browser?
 
Your browser can't see the source code of PHP files as the web server returns already compiled output from the execution of the script.

howudoin 18th October 2009 07:07 AM

Re: Is It Possible To See PHP Files Through A Web Browser?
 
I got it valentin, Simply view the source file of a webpage and you can get an idea about the backend php coding

Thanks any way!

KirkMcD 18th October 2009 07:37 AM

Re: Is It Possible To See PHP Files Through A Web Browser?
 
Quote:

Originally Posted by howudoin (Post 1292003)
Simply view the source file of a webpage and you can get an idea about the backend php coding

No, you can't. You'll learn nothing about the PHP used to build the page by viewing the html source code of the generated page.

TristanPerry 18th October 2009 08:01 AM

Re: Is It Possible To See PHP Files Through A Web Browser?
 
As above, you can't see *any* of the PHP code. Full stop. Hence it's name:

PHP: Hypertext Preprocessor

PHP takes place before anything is sent to the client - i.e. it's a server side language.

When you "View Source", you are seeing the HTML - which is the client-side code that makes up a web-page.

howudoin 18th October 2009 09:22 AM

Re: Is It Possible To See PHP Files Through A Web Browser?
 
Quote:

No, you can't. You'll learn nothing about the PHP used to build the page by viewing the html source code of the generated page.
Quote:

As above, you can't see *any* of the PHP code. Full stop. Hence it's name:

PHP: Hypertext Preprocessor

PHP takes place before anything is sent to the client - i.e. it's a server side language.

When you "View Source", you are seeing the HTML - which is the client-side code that makes up a web-page.
I just had to figure out the encrypted code in a free footer PHP file of a free wordpress blog, so simply looking at the source html worked fine, for getting rid of the *backlinks*

bbenson19 18th October 2009 09:37 AM

Re: Is It Possible To See PHP Files Through A Web Browser?
 
Yup, it's one of the advantages of Php. It's server source language. :)

g705 18th October 2009 02:07 PM

Re: Is It Possible To See PHP Files Through A Web Browser?
 
Yes there is no way unless u can download the file with its source

TamarBoy 21st October 2009 02:46 PM

Re: Is It Possible To See PHP Files Through A Web Browser?
 
The only way it can be done is for the PHP server to be de-registered with the server and if that where to happen, all hell would let loose. so it doesnt happen very often.

Voon 25th October 2009 11:49 AM

Just sharing my experience ...
 
Well, there is some time when my .htaccess is messed up (during apache upgrade) and my PHP file is no longer execute as PHP but plain text. Then my PHP source is leaked out. =/

This is a rare, but it's safe most of the time. =)

TheRichJerksNet 25th October 2009 10:12 PM

Re: Is It Possible To See PHP Files Through A Web Browser?
 
Quote:

Originally Posted by howudoin (Post 1292300)
I just had to figure out the encrypted code in a free footer PHP file of a free wordpress blog, so simply looking at the source html worked fine, for getting rid of the *backlinks*

So you got a free theme that you did not pay for and you decide that you do not want to give credit where credit is due and remove the link....

Is that about right ?

James

howudoin 8th January 2010 12:34 AM

Re: Is It Possible To See PHP Files Through A Web Browser?
 
Quote:

So you got a free theme that you did not pay for and you decide that you do not want to give credit where credit is due and remove the link....

Is that about right ?

James
I'm free to remove the "backlinks" since the same is stated in Terms of Usage of the theme.

Bhupinder

phptechie 8th January 2010 06:13 AM

Re: Is It Possible To See PHP Files Through A Web Browser?
 
As said by others PHP is a server side scripting , it just sends out the HTML response to your browser. So View Page Source will just give you the display part of it (HTML content) & not the application / business logic.

But if you host the php source files in a server where PHP is not installed or integrated , then the files that you access via browser will just simply display the full code without parsing & you can visually all the php code with html content.

If you purposely like to allow viewing the source code by your site visitors , then you can place the source code with ".phps" extension & when its viewed in the browser , it displays the code.

Hope this helps :-)

farasens1 8th January 2010 11:48 PM

Re: Is It Possible To See PHP Files Through A Web Browser?
 
No. It is not possible to see PHP files within the brower. You'll see the HTML created by the browser, but nothing more.

ereadergold 8th January 2010 11:59 PM

Re: Is It Possible To See PHP Files Through A Web Browser?
 
Quote:

Originally Posted by howudoin (Post 1592205)
I'm free to remove the "backlinks" since the same is stated in Terms of Usage of the theme.

Bhupinder

Its curious that the theme would have an encrypted footer if your Terms or Usage says you are free to remove them What would be the purpose of encrypting them in the first place?

Not accusing you of anything but I'm confused - as a developer I'd only bother to encrypt something that I didn't want modified.

Bill


All times are GMT -6. The time now is 06:51 PM.