Auto <base Href>?

liunx

Guest
I defined "base href" in my header. On my computer, it would be <a href="http://localhost" target="_blank">http://localhost</a> and on my live site it would be <a href="http://www.example.com" target="_blank">http://www.example.com</a>. After I'm done fiddling with my header include on my local computer, I have to remember to change that tag before I upload to my live site. Is there some kind of PHP script or command that can automatically define that tag for me somehow so I don't have to remember to change it every time? Or should I just stop being lazy?<!--content-->
The only thing I can think of is to include a config file in the header.<br />Have two config files, one local and one on your site.<br />with the base href in the config files as needed.<!--content-->
I agree with Don. You can define the base href in a config.php file and include it in every file.<!--content-->
<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->You can define the base href in a config.php file and include it in every file.<!--QuoteEnd--></div><!--QuoteEEnd--><br />Yah, I have a config.php. Just looking to automate that as well so when I make changes to it I don't forget. No big deal, I'll just suck it up and change it myself.<!--content-->
 
Back
Top