We're developing on a test location on the client's server and will eventually migrate to the production area.
Is there an easy way to declare a php variable in the first include to set the path for all the graphics, links, etc.?
For example, I've got index.php and contact/index.php which call:
Code: Select all
<?php include("header.php") ?>Code: Select all
<?php include("../header.php") ?>Now, in header.php I've got:
Code: Select all
<link rel="stylesheet" type="text/css" href="http://clientsite.com/css/style.css" />Code: Select all
<script type="text/javascript" src="http://clientsite.com/js/jquery.js"></script>Code: Select all
<a href="http://clientsite.com/page.html"><img src="http://clientsite.com/images/image.jpg" alt="1" border="0" /></a>Code: Select all
<?php
$root= "http://clientsite.com/";
?>Code: Select all
<?php
<link rel="stylesheet" type="text/css" href=$root.'/css/style.css' />
?>THANKS!!