How to view php source code?

Hi, I was wondering how I can view the php source code of a website?  I notice that when I use firebug or just view the regular source code that I can never see the php code and I would really like to be able to do that!  If anyone knows of a way please let me know. Thanks
FairyBusinessAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Avinash ZalaWeb ExpertCommented:
i think in browser you can't see the php code,

But if you know the actual path of the php file then you can do this by below php function.

highlight_file

http://php.net/manual/en/function.highlight-file.php


Hope this helps,
Addy
0
Om PrakashCommented:
You cannot see the PHP code of pages rendered in web browser. You can only see the HTML code generated by the PHP code from Browser.

Using firebug you can see the HTML/javascript/css files since they are static files but not PHP code.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Loganathan NatarajanLAMP DeveloperCommented:
You cannot the source of PHP files through firebug or any other tool from Client Side... you have to have server access or direct file access to view the source of PHP
0
V4nP3rs13Commented:
It is impossible to view PHP source. You can only see PHP on your server, but not others. There are few PHP functions that allows you to see the PHP on the same server. I'm not sure but I thing fread(); can show the code, but I'm not 100% sure.
0
darkappleCommented:
YOU CAN'T. The server (eg, apache) which hosts the php files process the files to generate necessary HTML codes with PHP engine so that browser can render it. No browser can understant PHP codes. All the PHP codes are processed in server and you'll only get HTML.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.