Jump to content

Recommended Posts

Posted

I defined "base href" in my header. On my computer, it would be http://localhost and on my live site it would be http://www.example.com. 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?

Posted

The only thing I can think of is to include a config file in the header.

Have two config files, one local and one on your site.

with the base href in the config files as needed.

Posted
You can define the base href in a config.php file and include it in every file.

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...