Hello,
I'm trying to display my images. It works in html but doesn't in php!
I'm working local for the moment using apache. Everything works except displaying my images. I can't display any image in my root! The root of my PHP pages is
"c:\phpweb" (doc_root).
For example in my root dir there's a picture test.gif.
So for testing I create a file img_test.php:
<?php
function fnc_img_path($img){
global $img_path;
$img_path = "$img";
}
echo(fnc_img_path('test.gif'));
print("<IMG src=\"$img_path\" width=133 height=178>");
?>
This code would normally display my image test.gif but it doesn't. My code will work if I copy for example the image under my c:\ and then change one thing in the code:
$img_path = "c:\$img";
I have the same problems with <bgsound src="test.mp3">! The sound will not play in the root, but when I set the mp3 anywhere else and change the path it 'll work. Also I can't use subfolders in my root (for ex. for my images, functions,...)!
Does anyone have an answer for me?
Please, it urgent!
Thanks in advance,
Boogey Man