![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
http://www.taktix.org/test.php
What's so good about that you ask? It hasn't got anything new and the links don't all work.
Simple says I. Look at the domain name carefully. It's PHP generated! Yippe ki yay! I've taught myself php :-D
test.php has 8 lines of code total, but it inserts 7 separate elements, each of which is independently updateable.
That means there's a small chance I may get around to doing more to the site from now on.
Oh yeah, my old monitor flickered and started smoking late last night (if it hadn't I'd have done this post yesterday before bed), so I went to Staples on a mission and am now the proud owner of a flat screen. I considered buying a new laptop, but have decided to teach myself how to build a system from scratch instead. Too much megatokyo perchance?
Um, anyone out there that knows how to build PCs, feel free to tell me where to, um, start. I'm not really much of a techie...
What's so good about that you ask? It hasn't got anything new and the links don't all work.
Simple says I. Look at the domain name carefully. It's PHP generated! Yippe ki yay! I've taught myself php :-D
test.php has 8 lines of code total, but it inserts 7 separate elements, each of which is independently updateable.
That means there's a small chance I may get around to doing more to the site from now on.
Oh yeah, my old monitor flickered and started smoking late last night (if it hadn't I'd have done this post yesterday before bed), so I went to Staples on a mission and am now the proud owner of a flat screen. I considered buying a new laptop, but have decided to teach myself how to build a system from scratch instead. Too much megatokyo perchance?
Um, anyone out there that knows how to build PCs, feel free to tell me where to, um, start. I'm not really much of a techie...
no subject
Date: 2005-Jan-01, Saturday 16:18 (UTC)And congrats on learning php, I wouldn't know where to start with that...
no subject
Date: 2005-Jan-01, Saturday 23:04 (UTC)no subject
Date: 2005-Jan-02, Sunday 16:16 (UTC)The most simple type of template system (where you can have every page on your site change with one edit), is only on more step from what you've already got...
Have a "_content.php" file that defines 2 functions "printPageStart()" and "printPageEnd()". They would look something like...
";
include("header.htm");
}
?>
Then in any file you want to fit into the template, you just have to include....
Really sorry if this sounds at all preachy. I wanted to just write it out as an explaination, but I realised it was much easier just to write some sample code so you could see what I mean.
The only advantage of doing it this way instead of having a bunch of include(html) lines in your code is that if you decide that you want to also have another include() (say you want to have a side bar or something), you don't have to go through every file to add it, you just change your printPageStart() function. Again, hope this is actually useful, and not just a load of worthless crap ;)