dunn_cann Posted December 31, 2006 Share Posted December 31, 2006 Hi everyone! Have only just started to learn PHP and although i have made a couple of very simple scripts "Hello World!" etc, and been able to view the HTML code could someone tell me how i can view the PHP source code please. Thanks folks. Quote Link to comment https://forums.phpfreaks.com/topic/32403-solved-viewing-source-code/ Share on other sites More sharing options...
dcro2 Posted December 31, 2006 Share Posted December 31, 2006 I'm not exactly sure what you mean, but you can't view the source code of just any .php file, they are pre-processed by PHP and you recieve only the HTML generated by the PHP script. ;D Quote Link to comment https://forums.phpfreaks.com/topic/32403-solved-viewing-source-code/#findComment-150499 Share on other sites More sharing options...
Philip Posted December 31, 2006 Share Posted December 31, 2006 PHP is a [b]server sided[/b] script. You have to have access to FTP or a control panel to view the source. Quote Link to comment https://forums.phpfreaks.com/topic/32403-solved-viewing-source-code/#findComment-150503 Share on other sites More sharing options...
dunn_cann Posted December 31, 2006 Author Share Posted December 31, 2006 I am learning PHP using xampp 1.5.5 and thought that being as the server is on my computer i would be able to see the php source code? Quote Link to comment https://forums.phpfreaks.com/topic/32403-solved-viewing-source-code/#findComment-150546 Share on other sites More sharing options...
wildteen88 Posted December 31, 2006 Share Posted December 31, 2006 Not through the browser you wont no. However you can when you open the file on your computer though. Quote Link to comment https://forums.phpfreaks.com/topic/32403-solved-viewing-source-code/#findComment-150548 Share on other sites More sharing options...
dunn_cann Posted January 1, 2007 Author Share Posted January 1, 2007 I'll get there in the end lol. Thanks for the replies. Quote Link to comment https://forums.phpfreaks.com/topic/32403-solved-viewing-source-code/#findComment-150728 Share on other sites More sharing options...
onlyican Posted January 1, 2007 Share Posted January 1, 2007 if you want to show someone your source code for any strange reason.Save the file as a .phpsThen when you upload this, it will show only the code, and will not be processed.Most servers allow for phps files.I only really use that for the following reasonsCreated a good script, and to show some people so they can use it (class's)Stuck on a large script and require help.BUTWhen you create websites, you do not want to be showing everyone your php code, as this will help hackers gain access. Quote Link to comment https://forums.phpfreaks.com/topic/32403-solved-viewing-source-code/#findComment-150771 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.