• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

php question

TheRunes

New Member
I was wondering if there is a way to use php to put a header on a website so I dont have to edit every page everytime I add a new page. I just edit a text file.
If there is a script already out there where can I find it?
 
What version browser would someone have to have to view the page correctly? Would Internet Exploder and Netscape 3.0 or older view it correctly?
 
PHP outputs the HTML so the browser basically understands HTML... So if the code ur php script generates is compatabile with the browsers it would work fine.

For example if ur php file outputs some IE supported stuff.. then it wont work in NS
 
Sample code

I have sample code to share if you need.
Contact via e-mail: lstrike@hem.passagen.se or ICQ: 3941368
 
IMHO <?virtual("/include/top.inc")?> works better because it works on all directories. If include/require does to, I didn't know :p.
 
the virtual function passes the file you are calling through apache first, adds it to the page, then passes through apache again, so it is inherently slower than include and require (the fastest). virtual is used for incluing cgi or perl scripts' output into the page.
 
you can use .htaccess and configure your files to be included sitewide without changing actual files themselves as if the include() function has been used
php_value auto_prepend_file "/full_path_blah-blah/header.php3"

the same with auto_append_file "" would be parsed after the main file.

you can do a lot customization with .htaccess
 
I don't know how to use .htaccess... I just recently got hold of a unix shell acount to teach myself unix and it came with webspace. If you could point me to a good place to learn about .htaccess, I would be happy. I have wanted to learn and I cant find any good places...
 
Ok, well I'm off to go replace all of my Virtual commands with require :p. Thanks Guys :).
 
Back
Top