Hi,
I am trying to make hyperlinks with the help of variable names.
I am running the script in http://mydomainname.com/directory1/index.php
At present when I use the included filenames it gives me problems like the links which r there in the file, they show the current links. like..:
The included file : Left.php it is located in the main web folder.
It has links.
These links open like http://mydomainname.com/directory1/linkname.php
But they should look like:
I want something like ..
If $domainname= mydomainname.com
My code is something like: http://mydomainname.com/linkname.php
// index.php
<?php
// directly finds current URL
$domainname = "http://$HTTP_HOST/";
echo $domainname;
?>
<?php include("$domainname.linkname.php"); ?>
<!-- Start of index.php -->
<?php include("$domainname.header-meta-tags.php"); ?>
<body link="#4D5AAC" vlink="#4D5AAC" alink="#4D5AAC" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<?php include("$domainname.top.php"); ?>
<?php include("$domainname.left.php"); ?>
</td>
<td width="2" bgcolor="#4D5AAC">
<img src="<?php echo $domainname."images/transparent.gif"; ?> width="2" height="1">
</td>
<!-- End of index.php -->
But this script doesnot work.. It doesnot give the URL in the INCLUDE AHREF LINK. How do i do it?
Thank you.
Nainil Chheda.