secure standard processes and/or procedures

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
salmon
Forum Newbie
Posts: 9
Joined: Tue Jun 24, 2008 5:03 pm

secure standard processes and/or procedures

Post 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.
User avatar
daedalus__
DevNet Resident
Posts: 1925
Joined: Thu Feb 09, 2006 4:52 pm

Re: secure standard processes and/or procedures

Post by daedalus__ »

template engines?
salmon
Forum Newbie
Posts: 9
Joined: Tue Jun 24, 2008 5:03 pm

Re: secure standard processes and/or procedures

Post 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"); ?>
User avatar
AbraCadaver
DevNet Master
Posts: 2572
Joined: Mon Feb 24, 2003 10:12 am
Location: The Republic of Texas
Contact:

Re: secure standard processes and/or procedures

Post 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...
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
User avatar
daedalus__
DevNet Resident
Posts: 1925
Joined: Thu Feb 09, 2006 4:52 pm

Re: secure standard processes and/or procedures

Post 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.
Post Reply