Page 1 of 1

secure standard processes and/or procedures

Posted: Mon Nov 30, 2009 5:09 pm
by salmon
I know there are many ways to do the same thing. Though I’m in search of secure standard processes and/or procedures in which I can follow on a regular bases. Guidelines which will make my job easier and my sites secure and coded the best way possible.

Example:
I would like to have a config file which has the sites URL, image location etc.. so when I move a site from a testing location to live, I need only change items in the config files so all links are correct. Avoiding the need to scour the sites code making sure the all links are correct for 50 plus sites pages.

Re: secure standard processes and/or procedures

Posted: Mon Nov 30, 2009 8:49 pm
by daedalus__
template engines?

Re: secure standard processes and/or procedures

Posted: Tue Dec 01, 2009 10:56 am
by salmon
Yes, template engine would a good example.

I have a design. Now I need to code it so the site is SEO, fast and secure. Here is an example of what my base code may look like:

Code: Select all

<?php includes($siteurl, "config.php"); ?>   
<?php includes($siteurl, "header.php"); ?>   
 
<div id="content">
 
</div>
 
<?php includes($siteurl, "header.php"); ?>

Re: secure standard processes and/or procedures

Posted: Tue Dec 01, 2009 12:17 pm
by AbraCadaver
salmon wrote:Yes, template engine would a good example.

I have a design. Now I need to code it so the site is SEO, fast and secure. Here is an example of what my base code may look like:

Code: Select all

<?php includes($siteurl, "config.php"); ?>   
<?php includes($siteurl, "header.php"); ?>   
 
<div id="content">
 
</div>
 
<?php includes($siteurl, "header.php"); ?>
They're really not URLs but filesystem paths in this example and have nothing to do with SEO. Also, I don't see why you need the path, just use relative paths depending upon where your files are. If you have a more complex example and directory layout, then post that.

If these are included by index.php and they are in the same dir, then this is all that is needed:

Code: Select all

include("config.php");  
include("header.php");
If they are in subdirs, then this:

Code: Select all

include("config/config.php");  
include("includes/header.php");
etc...

Re: secure standard processes and/or procedures

Posted: Tue Dec 01, 2009 10:51 pm
by daedalus__
i think you should use libraries that are already developed and maintained or go fast, hard, and dirty without trying to focus on writing frameworks.

everyone is so framework/library crazy nowadays they forgot about simple. i think it has calmed down lately but really. :\

running include trains on pages is something i used to do and it worked well for 80% of what i did. not everyone is writing a website that runs on a server farm, is made to control nuclear missles, and might have to handle ten million megabytes a minute someday.

ya dig?

about as complicated as i ever got was writing a stupid front controller.