|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
When to include?
I am creating a web site that does not use frames and only uses css, however i have the problem that when i go to constuct a .php page from several other .php pages there can rightly only be one <head></head> section, this is not a problem, however in each .php file there is the corresponding css file for that pages layout, so i was wondering without have to create one big css file or without having to include all css files by default if there was some way of writing in one file say header.php (which would include the <head></head> tags, thus requires to include the <link> tags for the css) what css files to include, now this may start to get messy so any suggestions are welcome!
Thanks in advance |
|
#2
|
|||||
|
|||||
|
RE: When to include?
Sure, you could have a header.php file that has the head tags..then within that file, you could conditionally include certain css file...something like this should work:
php Code:
|
|
#3
|
|||
|
|||
|
RE: When to include?
you could just have that one big css file, and use include_once("header.php") on the files that will need the css.
|
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > When to include? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|