brem13 Posted April 6, 2009 Share Posted April 6, 2009 hey, i get this error 'getimagesize(0) [function.getimagesize]: failed to open stream: ' here is my code $folder = "galleries/members/$userup/$album"; $pic = htmlspecialchars($_GET['pic']); $album = htmlspecialchars(strtoupper($_GET['album'])); $userup = htmlspecialchars(strtoupper($userlow)); list($width, $height) = getimagesize($folder/$pic); if($width > 600) { echo "<a href=\"$folder/$pic><img src=\"$folder/thumbs/$pic width=50%\">"; } any thoughts? Link to comment https://forums.phpfreaks.com/topic/152710-solved-getimagesize-error/ Share on other sites More sharing options...
ToonMariner Posted April 6, 2009 Share Posted April 6, 2009 try echoing out the path used in the function call.. also try delivering the FULL path - I often use $_SERVER['DOCUMENT_ROOT'] in any calls of any type to files to prevent anyone putting the path to their own files ... Link to comment https://forums.phpfreaks.com/topic/152710-solved-getimagesize-error/#findComment-801929 Share on other sites More sharing options...
brem13 Posted April 6, 2009 Author Share Posted April 6, 2009 i got it, i made a variable with the full image path and called that in the getimagesize Link to comment https://forums.phpfreaks.com/topic/152710-solved-getimagesize-error/#findComment-801970 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.