Closed Thread Icon

Topic awaiting preservation: php linking to root directory (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=12029" title="Pages that link to Topic awaiting preservation: php linking to root directory (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: php linking to root directory <span class="small">(Page 1 of 1)</span>\

 
evilclown01
Nervous Wreck (II) Inmate

From:
Insane since: Dec 2001

posted posted 02-03-2002 03:12

I have a stylesheet and a footer.inc in /.

How do i link to it so /index.php and /foo/index.php can use the same style sheet? (I think i need to use some environment variable.)

edit: I'm having problems with llinks on my foxserv (apache/php/mysql) server. why does http://127.0.0.1/foo not work, but http://127.0.0.1/foo/ work? Should I edit something in my http.conf?

evilclown01

[This message has been edited by evilclown01 (edited 02-03-2002).]

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 02-03-2002 08:32

1. To include stylesheet file in the "HTML" way, use the following: <LINK REL="stylesheet" TYPE="text/css" HREF="/stylesheet.css"> (This will load stylesheet.css file, located at the document root, in all other documents, located anywhere else inside document root). On the other hand, if you have a file that you want to include via PHP include() function and it's located at document root, you can use the following code: include($DOCUMENT_ROOT . "stylesheet.inc");

2. You should modify options that are set in your httpd.conf file. Take a look at Apache documentation, especially <Directory> & Options configuration directives.




[This message has been edited by mr.maX (edited 02-03-2002).]

« BackwardsOnwards »

Show Forum Drop Down Menu