Forum Moderators: coopster

Message Too Old, No Replies

Php Image problem

         

adamnichols45

4:07 pm on Dec 22, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi, Could some one please tell me why on my computer when this script is used it shows the image but when i test this script from another computer it just does not show the image! script is below thanks for looking.

<?php

if(!is_dir($store_dir) )
{
echo("Specified directory is not valid... Exiting");
@unlink($HTTP_POST_FILES['upfile']['tmp_name']);
exit();
}
if( copy($HTTP_POST_FILES['upfile']['tmp_name'],$store_dir.$test3) )
{
echo("");
}
else
{
echo("Upload of ".$HTTP_POST_FILES['upfile']['name']." to ".$store_dir." failed!<BR>");
}
@unlink($HTTP_POST_FILES['upfile']['tmp_name']);
?><img src="uploads/<?php echo $log;?><?php echo $filename;?>" alt="" width="180" height="150" border="0">

jatar_k

5:16 pm on Dec 22, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



do you get a broken image or do you get some kind of error?
is $store_dir setup properly?
Do you see the image in there if you just look in directory itself?

adamnichols45

6:24 pm on Dec 22, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



just no image fullstop but yes it doesput the image int htere correctly and it is all set up ok...

jatar_k

6:31 pm on Dec 22, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



did you take a look at the html it outputs?

uploads/<?php echo $log;?><?php echo $filename;?>

if you view source for that is the path correct?

adamnichols45

6:59 pm on Dec 22, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



yes everything looks ok - it works on all 3 of my computers at home but if i try it from a mates computer the image gets added but does not show on the next page.