Hola, PHP folk-

I am using

$page_title="some page title here";
require('header.inc');

to include a common header for all my pages. I am using $page_title so I can have unique names for the different pages.

//---header.inc
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
  <head>
    <title><?php echo $page_title; ?></title>
    <link rel=stylesheet href="./some.css" type="text/css">
  </head>
<body>
...



I want to be able to also define the path to the CSS file. For instance, some pages will have the CSS in the same directory, so that part would read

"./my.css"

If the page is located in a subdirectory, the path would then be

"../my.css"

I would like to use a php variable where I can define the path the same way as the $page_title works. I have tried some experiments with a $path_to_css variable, but I have not had much success. I think part of the problem is that I might be stumbling over escaping everything properly.

Is there a better way to do what I am trying to do?

Thanks,
Danny

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to