Jump to content

[SOLVED] calling the scripts, instead of having the scripts on my pages.


Reaper0167

Recommended Posts

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.

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

 

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.