Good day!
Is it possible to use tag for specific references and URL's only?
I encountered a problem wherein there is an error anchor tag and its href attribute. For example, there is a module loans, all the PHP files of that module is located at only one folder, take a look of this:
these are the folders and the website:
htdocs - system - members - loans(loan-app.php, loan-sum.php)
If I'm going to use base tag, I got an error whenever I place an src on tags on my code, so as a solution I wont include the value in the base tag in images and only use in links. Is it possible?
Note: Someone suggested me here that I just need to disable the currently opened module to avoid concatenation of url and error. But I realized it just now that I can't because I have another link that is needed to be enable if I open the another BUT they have the same location because they belong at the same module. Unfortunately it can cause concatenation of url.
Anyway, here is my previous question in related to this :
The
baseelement is used for relative URLs. If you use a full URL for anaelement,imgelement,linkelement, etc thebaseelement will simply be ignored. Thebaseelement is extremely useful for when you want to test local versus live (as you should always test locally first). You can not choose for the base element to only apply to certain situations unless you want to get in to extremely convoluted JavaScript which I don't recommend.Base Element
Relative URLs
Use
index.phpin the folderloans/sum/[index.php]to create clean URLs if you're not using something such as Apache rewrites.Effective URLs
Most people start out with convoluting their setups. You should only have the domain name's root most directory (as demonstrated above) and make all your URLs relative.
For the
baseelement itself you should use PHP to determine whether the site is local or live and then echo the appropriate path; that way you don't any convoluted setup like needing two separate copies of the site.You will want to split your
baseelement's PHP code in to two parts; for the live site the$url2should only be/and then since you'll naturally have other projects archived and/or in development then forlocalhostyou'll change the path accordingly.Base Element PHP - Part 1
Base Element PHP - Part 2
You'll have to do a little bit of work here but this should open your mind up to other juicy possibilities for down the road to make your life easier plus I don't know all your local directory structures. So explore the
$_SERVERarray to start putting together the$url1string and remember to keep it simple.