Click to See Complete Forum and Search --> : How to do correct path?
toplisek
05-15-2007, 05:41 AM
I have code on all pages like:
$_PATH1="http://" . $_SERVER['HTTP_HOST']."/";
Why I have to add on link for images also / that it will work as it is already there / in
$_PATH1="http://" . $_SERVER['HTTP_HOST']."/";
Link is like sample:
<img src="<?=$_PATH1 ?>images/myimage.jpg" ></a>
Need help
dzysyak
05-15-2007, 07:43 PM
Sorry, question is not clear. I think you should not add the domain name there. Not sure what you are trying to do.
toplisek
05-16-2007, 01:21 AM
Hi, I have many folders on web site and would like to do with PHP that image folder will be seen without publishing whole path URL.
So, example, there are folders like service, images. How to do that I just put PHP code and it will recognise server URL? I hope it was clear...:confused:
dzysyak
05-16-2007, 06:27 AM
In HTML you can just write:
<img src="images/file.gif" alt=".."/>
But if you need to replace folder name "images" to something else you should use mod_rewrite.
Sergiy,
PHP/MySQL/AJAX web site development (http://site4fast.com)
toplisek
05-16-2007, 06:38 AM
In HTML you can just write:
<img src="images/file.gif" alt=".."/>
you did not understand me. I need with PHP code to define path.
folder structure is like:
index.php
folder1: images
subfolder1 in images: products