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.

Link to comment
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.