umm dont know wat to do here

I have a website hosted with 100webspace.com (freesuperhost.com) and they have UNIX server with Apache on (well, something compatible with .htaccess file, i have it and it works) and I am stuck trying to figure out how to add .css files to the beginning of every page with a certain extension.

What I want is to add a .css file just after the tag in .php pages. I have already tried

[code]
AddHeader website.css .php
[/code]

but that generated a 500 server err and brought my whole website down... which is something i don't want. Does anyone know anything that could help me here?

Thanks in advance

Aaron

Comments

  • This might be ignorance on my behalf, but I've never heard of an AddHeader directive for Apache config files. I Googled it and came up empty. Are you sure this is a valid directive?

    I would suggest you just use a line like this at the top of each page:

    [code]

    [/code]

    Linking to the CSS like that is better than actually putting the contents of it at the top of every page. With the link method, the user will only have to download the CSS once instead of again on every page hit.

    Hope that helps. Let me know if you still have questions.

    T

    : I have a website hosted with 100webspace.com (freesuperhost.com) and they have UNIX server with Apache on (well, something compatible with .htaccess file, i have it and it works) and I am stuck trying to figure out how to add .css files to the beginning of every page with a certain extension.
    :
    : What I want is to add a .css file just after the tag in .php pages. I have already tried
    :
    : [code]
    : AddHeader website.css .php
    : [/code]
    :
    : but that generated a 500 server err and brought my whole website down... which is something i don't want. Does anyone know anything that could help me here?
    :
    : Thanks in advance
    :
    : Aaron
    :

  • Rather than include it at the top of every page (perhaps I misunderstand), I created a "header.php" file that I include() in all of my 'main' pages... So my index.php would contain first, include('header.php');

    It's in my header.php that I do all the initial tags for head, title, and body. And it's also in this that I make the links to stylesheets.

    So header.php could be like
    [code]



    Hi!


    [/code]

    And index.php (and every other "actual" page) would begin with
    [code]
    <?php
    include_once('header.php') ;
    ?>
    [/code]

    This way, I only ever need to change my header.php if I want a different stylesheet for all pages.

    - Tony.

    : This might be ignorance on my behalf, but I've never heard of an AddHeader directive for Apache config files. I Googled it and came up empty. Are you sure this is a valid directive?
    :
    : I would suggest you just use a line like this at the top of each page:
    :
    : [code]
    :
    : [/code]
    :
    : Linking to the CSS like that is better than actually putting the contents of it at the top of every page. With the link method, the user will only have to download the CSS once instead of again on every page hit.
    :
    : Hope that helps. Let me know if you still have questions.
    :
    : T
    :
    : : I have a website hosted with 100webspace.com (freesuperhost.com) and they have UNIX server with Apache on (well, something compatible with .htaccess file, i have it and it works) and I am stuck trying to figure out how to add .css files to the beginning of every page with a certain extension.
    : :
    : : What I want is to add a .css file just after the tag in .php pages. I have already tried
    : :
    : : [code]
    : : AddHeader website.css .php
    : : [/code]
    : :
    : : but that generated a 500 server err and brought my whole website down... which is something i don't want. Does anyone know anything that could help me here?
    : :
    : : Thanks in advance
    : :
    : : Aaron
    : :
    :
    :
    /*

    Those of you who believe in
    psychokenesis, raise my hand.

    */

  • thats half what i wanted and half useless :P

    i know i could do it that way, and thx for the quick response but what I really want to do is have .htaccess include it for me rather then me have to insert an include() command in EVERY page on my website :(. I used to be able to do this in asp with something called global.asa, does php have anything similar? i dont want to insert the one line to the file in every page, just cos im too lazy :P

    : Rather than include it at the top of every page (perhaps I misunderstand), I created a "header.php" file that I include() in all of my 'main' pages... So my index.php would contain first, include('header.php');
    :
    : It's in my header.php that I do all the initial tags for head, title, and body. And it's also in this that I make the links to stylesheets.
    :
    : So header.php could be like
    : [code]
    :
    :
    :
    : Hi!
    :
    :
    : [/code]
    :
    : And index.php (and every other "actual" page) would begin with
    : [code]
    : <?php
    : include_once('header.php') ;
    : ?>
    : [/code]
    :
    : This way, I only ever need to change my header.php if I want a different stylesheet for all pages.
    :
    : - Tony.
    :
    : : This might be ignorance on my behalf, but I've never heard of an AddHeader directive for Apache config files. I Googled it and came up empty. Are you sure this is a valid directive?
    : :
    : : I would suggest you just use a line like this at the top of each page:
    : :
    : : [code]
    : :
    : : [/code]
    : :
    : : Linking to the CSS like that is better than actually putting the contents of it at the top of every page. With the link method, the user will only have to download the CSS once instead of again on every page hit.
    : :
    : : Hope that helps. Let me know if you still have questions.
    : :
    : : T
    : :
    : : : I have a website hosted with 100webspace.com (freesuperhost.com) and they have UNIX server with Apache on (well, something compatible with .htaccess file, i have it and it works) and I am stuck trying to figure out how to add .css files to the beginning of every page with a certain extension.
    : : :
    : : : What I want is to add a .css file just after the tag in .php pages. I have already tried
    : : :
    : : : [code]
    : : : AddHeader website.css .php
    : : : [/code]
    : : :
    : : : but that generated a 500 server err and brought my whole website down... which is something i don't want. Does anyone know anything that could help me here?
    : : :
    : : : Thanks in advance
    : : :
    : : : Aaron
    : : :
    : :
    : :
    : /*
    :
    : Those of you who believe in
    : psychokenesis, raise my hand.
    :
    : */
    :
    :

  • dont ask me WHY i just posted that, I forgot that I now have IIS 5.1 on my winxp home computer, and that lets you specify things to be included automatically... YAY!!

    Those of you who think you can't have IIS on winxp home, you are sadly mistaken, just a simple file / registry edit, then standard winxp components add/remove page... you can tick it, and it installs it! YAY

    : thats half what i wanted and half useless :P
    :
    : i know i could do it that way, and thx for the quick response but what I really want to do is have .htaccess include it for me rather then me have to insert an include() command in EVERY page on my website :(. I used to be able to do this in asp with something called global.asa, does php have anything similar? i dont want to insert the one line to the file in every page, just cos im too lazy :P
    :
    : : Rather than include it at the top of every page (perhaps I misunderstand), I created a "header.php" file that I include() in all of my 'main' pages... So my index.php would contain first, include('header.php');
    : :
    : : It's in my header.php that I do all the initial tags for head, title, and body. And it's also in this that I make the links to stylesheets.
    : :
    : : So header.php could be like
    : : [code]
    : :
    : :
    : :
    : : Hi!
    : :
    : :
    : : [/code]
    : :
    : : And index.php (and every other "actual" page) would begin with
    : : [code]
    : : <?php
    : : include_once('header.php') ;
    : : ?>
    : : [/code]
    : :
    : : This way, I only ever need to change my header.php if I want a different stylesheet for all pages.
    : :
    : : - Tony.
    : :
    : : : This might be ignorance on my behalf, but I've never heard of an AddHeader directive for Apache config files. I Googled it and came up empty. Are you sure this is a valid directive?
    : : :
    : : : I would suggest you just use a line like this at the top of each page:
    : : :
    : : : [code]
    : : :
    : : : [/code]
    : : :
    : : : Linking to the CSS like that is better than actually putting the contents of it at the top of every page. With the link method, the user will only have to download the CSS once instead of again on every page hit.
    : : :
    : : : Hope that helps. Let me know if you still have questions.
    : : :
    : : : T
    : : :
    : : : : I have a website hosted with 100webspace.com (freesuperhost.com) and they have UNIX server with Apache on (well, something compatible with .htaccess file, i have it and it works) and I am stuck trying to figure out how to add .css files to the beginning of every page with a certain extension.
    : : : :
    : : : : What I want is to add a .css file just after the tag in .php pages. I have already tried
    : : : :
    : : : : [code]
    : : : : AddHeader website.css .php
    : : : : [/code]
    : : : :
    : : : : but that generated a 500 server err and brought my whole website down... which is something i don't want. Does anyone know anything that could help me here?
    : : : :
    : : : : Thanks in advance
    : : : :
    : : : : Aaron
    : : : :
    : : :
    : : :
    : : /*
    : :
    : : Those of you who believe in
    : : psychokenesis, raise my hand.
    : :
    : : */
    : :
    : :
    :
    :

  • Heheh! :)

    I once read that good coders are often pretty lazy people. The idea was that they write code to solve their problem for them, rather than working it out themself. Being lazy, I didn't want to have to do tons of links in HTML for any of my sites, so I created a script to read a file and extract the links from it. In this file I would define the link as a URL followed by the text I wanted to represent it. The script took it in, and inserted it automagically into my web-pages. :) I've been using it since (about 2 years now). I love that script! 'Tho it probably isn't the most efficient of scripts, it does the job perfectly.

    In answer to your question, I have no idea. I'm not that profficient with Php. Sorry.

    : thats half what i wanted and half useless :P
    :
    : i know i could do it that way, and thx for the quick response but what I really want to do is have .htaccess include it for me rather then me have to insert an include() command in EVERY page on my website :(. I used to be able to do this in asp with something called global.asa, does php have anything similar? i dont want to insert the one line to the file in every page, just cos im too lazy :P
    :
    : : Rather than include it at the top of every page (perhaps I misunderstand), I created a "header.php" file that I include() in all of my 'main' pages... So my index.php would contain first, include('header.php');
    : :
    : : It's in my header.php that I do all the initial tags for head, title, and body. And it's also in this that I make the links to stylesheets.
    : :
    : : So header.php could be like
    : : [code]
    : :
    : :
    : :
    : : Hi!
    : :
    : :
    : : [/code]
    : :
    : : And index.php (and every other "actual" page) would begin with
    : : [code]
    : : <?php
    : : include_once('header.php') ;
    : : ?>
    : : [/code]
    : :
    : : This way, I only ever need to change my header.php if I want a different stylesheet for all pages.
    : :
    : : - Tony.
    : :
    : : : This might be ignorance on my behalf, but I've never heard of an AddHeader directive for Apache config files. I Googled it and came up empty. Are you sure this is a valid directive?
    : : :
    : : : I would suggest you just use a line like this at the top of each page:
    : : :
    : : : [code]
    : : :
    : : : [/code]
    : : :
    : : : Linking to the CSS like that is better than actually putting the contents of it at the top of every page. With the link method, the user will only have to download the CSS once instead of again on every page hit.
    : : :
    : : : Hope that helps. Let me know if you still have questions.
    : : :
    : : : T
    : : :
    : : : : I have a website hosted with 100webspace.com (freesuperhost.com) and they have UNIX server with Apache on (well, something compatible with .htaccess file, i have it and it works) and I am stuck trying to figure out how to add .css files to the beginning of every page with a certain extension.
    : : : :
    : : : : What I want is to add a .css file just after the tag in .php pages. I have already tried
    : : : :
    : : : : [code]
    : : : : AddHeader website.css .php
    : : : : [/code]
    : : : :
    : : : : but that generated a 500 server err and brought my whole website down... which is something i don't want. Does anyone know anything that could help me here?
    : : : :
    : : : : Thanks in advance
    : : : :
    : : : : Aaron
    : : : :
    : : :
    : : :
    : : /*
    : :
    : : Those of you who believe in
    : : psychokenesis, raise my hand.
    : :
    : : */
    : :
    : :
    :
    :
    /*

    Those of you who believe in
    psychokenesis, raise my hand.

    */

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories