Hello!
I have a problem with my imageuploadingscript. I'm trying to pass a relative path as argument to the getimagesize()-function, but I'm doing something wrong. The code looks like this:
$uploaddir = "E:/$uploaddir_arr = explode("/",$uploaddir);
$id = time(); //give the image a unique name
$temp = array($my_url_arr[0],'//',$my_url_arr[2],'/', $uploaddir_arr[2], "/", $uploaddir_arr[3], "/", $id, $punkt, $filtyp['1']);
$ny_url = implode($temp);
$temp = array($uploaddir_arr[3], "/", $id, $punkt, $filtyp['1']);
$rel_url = implode($temp);
//$rel_url = "bilder/1069071787.jpg";
$bilddata = getimagesize($rel_url);
My problem is that the variable $rel_url does not work. As you can see I have tried the string 'bilder/1069071787.jpg'which works fine, but the variable doesn't.
You can see for yourself at
Any suggestions?
Olle
I have a problem with my imageuploadingscript. I'm trying to pass a relative path as argument to the getimagesize()-function, but I'm doing something wrong. The code looks like this:
$uploaddir = "E:/$uploaddir_arr = explode("/",$uploaddir);
$id = time(); //give the image a unique name
$temp = array($my_url_arr[0],'//',$my_url_arr[2],'/', $uploaddir_arr[2], "/", $uploaddir_arr[3], "/", $id, $punkt, $filtyp['1']);
$ny_url = implode($temp);
$temp = array($uploaddir_arr[3], "/", $id, $punkt, $filtyp['1']);
$rel_url = implode($temp);
//$rel_url = "bilder/1069071787.jpg";
$bilddata = getimagesize($rel_url);
My problem is that the variable $rel_url does not work. As you can see I have tried the string 'bilder/1069071787.jpg'which works fine, but the variable doesn't.
You can see for yourself at
Any suggestions?
Olle