Closing Doman Auctions
DNForum - Domain Sales, Domain Forum, Domain Appraisals, Domain Registrars
HomeRegisterMembershipsGetting StartedDomain Tools Domain EbooksSEO Software Domain Resellers Advertise

Go Back   DNForum - Domain Sales, Domain Forum, Domain Appraisals, Domain Registrars > Content Development > Website Development and Design Discussion > Coding/Programming/Languages
Register Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old 02-29-2008, 09:02 AM   #1 (permalink)
Platinum Lifetime Member
 
elivate's Avatar
 
Name: Peter
Last Online: Yesterday 03:30 PM
iTrader: (30)
Join Date: Aug 2005
Posts: 1,571
DNF$: 0
Location: Canada
Country:


Some basic php tips...

I just wanted to share a couple of simple tips that may help out some of those who are new to developing sites using .php

One of the best tips I think is to use includes as often as you can. I always use an include for my main navigation menu and footer, and sometimes for my header, too... This allows you to make updates easily in one place, and saves a lot of time. It also reduces the chances of making a mistake and having conflicting information on your site...

A basic include in php looks like this:

Code:
<? 
     include("menu.php");
?>
Another thing you see a lot is a footer that has a copyright and a date, usually just the year, and it is out of date... Here is an easy way to avoid that problem:

Code:
<?php
$today = date("Y");
?>

Copyright © <?=$today?> My Website.
Anyway, these are just a couple of simple tips I thought I would share...
elivate is offline   Reply With Quote
Sponsored Ads
Old 02-29-2008, 09:04 AM   #2 (permalink)
The Evil Mod
 
draggar's Avatar
 
Name: Ed
Last Online: Yesterday 09:18 PM
iTrader: (36)
Join Date: Dec 2007
Posts: 8,355
DNF$: 63
Location: South Florida
Country:

Send a message via ICQ to draggar Send a message via AIM to draggar

I LOVE the include() command.

It is the best for editing headers, footers, link bars, etc..

Plus, all it has to be is a plain old html page (with no <html><head><body> tags). Whenever you look at my sites each page is a minimum of 3-4 pages, some up to 6 or 7 and does not have a noticeable impact on load speeds, even 56K.
draggar is offline   Reply With Quote
Old 02-29-2008, 09:12 AM   #3 (permalink)
Platinum Lifetime Member
 
elivate's Avatar
 
Name: Peter
Last Online: Yesterday 03:30 PM
iTrader: (30)
Join Date: Aug 2005
Posts: 1,571
DNF$: 0
Location: Canada
Country:


Quote:
Originally Posted by draggar View Post
I LOVE the include() command.

It is the best for editing headers, footers, link bars, etc..

Plus, all it has to be is a plain old html page (with no <html><head><body> tags). Whenever you look at my sites each page is a minimum of 3-4 pages, some up to 6 or 7 and does not have a noticeable impact on load speeds, even 56K.
Exactly, these are the sort of small things that can make developing and maintaining sites a lot easier...

Also, this is obviously not just for .php, you just need to know the proper syntax for the language of choice...
elivate is offline   Reply With Quote
Old 02-29-2008, 09:37 AM   #4 (permalink)
The Evil Mod
 
draggar's Avatar
 
Name: Ed
Last Online: Yesterday 09:18 PM
iTrader: (36)
Join Date: Dec 2007
Posts: 8,355
DNF$: 63
Location: South Florida
Country:

Send a message via ICQ to draggar Send a message via AIM to draggar

Used correctly, PHP and CSS can make excellent sites, very professional looking, easy to maintain, and no need for "web creation" software (but I will admit, DreamWeaver is great for editing large sites).
draggar is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 06:27 AM.
Copyright @2001-2009 DNForum.com