klitscher Posted February 28, 2006 Share Posted February 28, 2006 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 Link to comment https://forums.phpfreaks.com/topic/3735-random-php-function-question/ Share on other sites More sharing options...
jurass1c Posted February 28, 2006 Share Posted February 28, 2006 [!--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 Quote Link to comment https://forums.phpfreaks.com/topic/3735-random-php-function-question/#findComment-12974 Share on other sites More sharing options...
klitscher Posted February 28, 2006 Author Share Posted February 28, 2006 [!--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 Quote Link to comment https://forums.phpfreaks.com/topic/3735-random-php-function-question/#findComment-13024 Share on other sites More sharing options...
running_out_of_imagination Posted March 1, 2006 Share Posted March 1, 2006 Do you mean a function like highlight_file()? Quote Link to comment https://forums.phpfreaks.com/topic/3735-random-php-function-question/#findComment-13169 Share on other sites More sharing options...
klitscher Posted March 1, 2006 Author Share Posted March 1, 2006 [!--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()? Quote Link to comment https://forums.phpfreaks.com/topic/3735-random-php-function-question/#findComment-13196 Share on other sites More sharing options...
running_out_of_imagination Posted March 1, 2006 Share Posted March 1, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/3735-random-php-function-question/#findComment-13366 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.