Reaper0167 Posted June 26, 2009 Share Posted June 26, 2009 Everyone keeps telling me about security and it sounds like a big deal. And I do know that source code can be viewed on websites, which I heard makes it easier for hackers to do their job. I have a lot of pages with 4-5 scripts within each one. My question is, can I have all those scripts, in all my pages, located in one secure file and then call them where I need them on my pages? Wouldn't it be better to not have all those scripts viewable to everyone. Link to comment https://forums.phpfreaks.com/topic/163823-solved-calling-the-scripts-instead-of-having-the-scripts-on-my-pages/ Share on other sites More sharing options...
Reaper0167 Posted June 26, 2009 Author Share Posted June 26, 2009 sorry for the post, I just checked out the source on my pages, and I can not find the php scripts at all? I could of sworn I have seen them in there before. Does it always hide the scripts within a page from view? Link to comment https://forums.phpfreaks.com/topic/163823-solved-calling-the-scripts-instead-of-having-the-scripts-on-my-pages/#findComment-864381 Share on other sites More sharing options...
SetToLoki Posted June 26, 2009 Share Posted June 26, 2009 Everyone keeps telling me about security and it sounds like a big deal. And I do know that source code can be viewed on websites, which I heard makes it easier for hackers to do their job. I have a lot of pages with 4-5 scripts within each one. My question is, can I have all those scripts, in all my pages, located in one secure file and then call them where I need them on my pages? Wouldn't it be better to not have all those scripts viewable to everyone. php can't be seen in the source code, as it is server side and generates html. you can include files to your pages as you need them using include_once("path.to.file") or require_once("path.to.file") http://uk2.php.net/require_once http://uk2.php.net/include_once Link to comment https://forums.phpfreaks.com/topic/163823-solved-calling-the-scripts-instead-of-having-the-scripts-on-my-pages/#findComment-864382 Share on other sites More sharing options...
natepizzle Posted June 26, 2009 Share Posted June 26, 2009 And I do know that source code can be viewed on websites html and javascript can be viewed but a site with a working php parser, the php isn't viewable as its server side. Link to comment https://forums.phpfreaks.com/topic/163823-solved-calling-the-scripts-instead-of-having-the-scripts-on-my-pages/#findComment-864383 Share on other sites More sharing options...
Reaper0167 Posted June 27, 2009 Author Share Posted June 27, 2009 thank you. Link to comment https://forums.phpfreaks.com/topic/163823-solved-calling-the-scripts-instead-of-having-the-scripts-on-my-pages/#findComment-864393 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.