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.csscss/template.css
does not work
Have you tried anything?
Try following things:
./css/template.css
/css/template.css
css/template.css
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).
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.
精彩评论