Jump to content

Random php function question


klitscher

Recommended Posts

To be honest, I can't remember if I dreamt this (dreaming about programming, such a life I have) or if it is real, but is there a function one can call to get the php code from a php file displayed in a browser...I know that you can't just save a php file and look at the code, it is all handled on the server end, but I either dreamt or read that there is a function that you can use to read the backend code for any file...and if this is so, is it only possible on localhost or can you check any url in cyberspace for it?

I apologize if i make no sense.

Ken
[!--quoteo(post=350170:date=Feb 28 2006, 03:31 AM:name=klitscher)--][div class=\'quotetop\']QUOTE(klitscher @ Feb 28 2006, 03:31 AM) [snapback]350170[/snapback][/div][div class=\'quotemain\'][!--quotec--]
To be honest, I can't remember if I dreamt this (dreaming about programming, such a life I have) or if it is real, but is there a function one can call to get the php code from a php file displayed in a browser...I know that you can't just save a php file and look at the code, it is all handled on the server end, but I either dreamt or read that there is a function that you can use to read the backend code for any file...and if this is so, is it only possible on localhost or can you check any url in cyberspace for it?

I apologize if i make no sense.

Ken
[/quote]

rename your file to .phps
[!--quoteo(post=350180:date=Feb 28 2006, 04:39 AM:name=jurasipize)--][div class=\'quotetop\']QUOTE(jurasipize @ Feb 28 2006, 04:39 AM) [snapback]350180[/snapback][/div][div class=\'quotemain\'][!--quotec--]
rename your file to .phps
[/quote]

Thanks for your help...for some reason I thought there was a function that could get [i]any[/i] url and display it as code in a browser, thereby allowing one to see passwords to databases and the like. must have dreamt it. pretty pathetic. thanks again
[!--quoteo(post=350448:date=Feb 28 2006, 05:36 PM:name=Running out of imagination)--][div class=\'quotetop\']QUOTE(Running out of imagination @ Feb 28 2006, 05:36 PM) [snapback]350448[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Do you mean a function like highlight_file()?
[/quote]

yes i do...okay, atleast i was not dreaming...now a completely different question...do i need to be worried that i have a config file that has database username and password in it and people can read it using highlight_file()?
yes, maybe have the database details on a dbconfig.php and just include it on the main script. Also don't try to have highlight_file($_GET[$bar]) as people could just change the variable on the URL.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.