View Full Version : need a specific php tutorial
debris
March 20th, 2002, 22:08
Hi. I know there are hundreds upon hundreds of PHP tutorials out there, but I'm looking for a simple one which will teach me how to create PHP pages, as in http://domain.com/page1.php and /page2.php instead of the more common http://domain.com/?z=page.html
If you have any helpful links to share, I'd appreciate that. :)
invalid
March 21st, 2002, 19:00
open notepad
type in all your code
save as yourfilename.php
done
Lokannon
March 21st, 2002, 19:30
WOW, YOUR GOOD!!!
dont think thats exactly what he meant though... but good effort!!!!!!
lol
:: Lokannon
cheatpark
March 21st, 2002, 19:32
No. Thats what he meant.
debris
March 21st, 2002, 19:42
Um no, that's not really what I want. I would like to make a PHP template, you know, having one page with the layout codes typed in it and then the rest of the pages containing just the content (just text-related HTML codes)? If you're not sure of what I'm talking about, I can give more details.
But thanks anyway, Invalid.
P.S. I'm not a "he", I'm a "she". ;)
bigperm
March 21st, 2002, 22:07
Ok, that's easy. You make a template, and split it into two files, the part above the content you save as header.inc.php, and the part below the content you save as footer.inc.php.
Then for each page of your site you put this:
<? include "/path/to/header.inc.php" ?>
Content here.
<? include "/path/to/footer.inc.php" ?>
debris
March 21st, 2002, 22:50
< total newbie question > And my site's pages' file extension will be... .php, is that right? Or do I save them in .html as usual? < / newbie question >
bigperm
March 21st, 2002, 22:59
You must name them *.php, so that the server knows to parse them.
And remeber to replace /path/to/file.inc.php to the absolute path of those two files.
If you don't know the absolute path, then jsut use the http:// path. <? include "http://whatever.com/header.inc.php" ?>
debris
March 21st, 2002, 23:07
Thanks a lot, bigperm. :) I love your avatar, by the way. Hehe.
Powered by vBulletin® Version 4.1.7 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.