Reputation: 16629
How do i reference a file template.css from index.php . This file is located within the folder "css" where index.php and css are at the same level.
index.php
css -> template.css
css/template.css
does not work
Upvotes: 0
Views: 103
Reputation: 59660
Have you tried anything?
Try following things:
./css/template.css
/css/template.css
css/template.css
Upvotes: 1
Reputation: 723
This should work ./css/template.css
. ./
refers to the current working directory.
This also works: /css/template.css
, but there might be a problem in some unix systems as /
usually refers to the root folder (of the project).
Upvotes: 1
Reputation: 3696
Are you linking the .css file correctly?
<link rel="stylesheet" href="css/template.css"/>
in the <head>
tag.
If so it could be that the permissions are incorrect on the .css file. Check that the .css file can be read by the user that the web server runs as.
Upvotes: 0