I am new to PHP but have a good understanding of coding as I have done other languages for about a year now.
I did the PHP web gallery tutorial on : http://betterphp.co.uk/playlist.html?pi ... 2BCB69CCEC
But it wont work for me. It wont create a thumbnail folder or do anything on the page besides give me this:
$thumb_aspect){ // wider $new_size = array(($thumb_width / $src_size[1]) * $src_size[0],$thumb_height); $src_pos = array(($new_size[0] - $thumb_width) * ($src_size[0] / $new_size[0])) / 2, 0); }else{ // same shape $new_size = array($thumb_width, $thumb_height); $src_pos = array(0, 0); } if ($new_size[0] < 1){$new_size[0] = 1; if ($new_size{1} , 1) $new_size[1] = 1; $thumb = imagecreatetruecolor($thumb_width, $thumb_height); imagecopyresampled($thumb, $src, 0, 0, $src_pos[0], $src_pos[1], $new_size[0], $new_size[1], $src_size [0], $src_size[1]); if ($src_size['mime'} === 'image/jpeg'){ imagejpeg($thumb, "thumbs/{$_GET['img']"); }else if ($src_size['mime'] === 'image/png'){ imagepng($thumb, "thumbs/{$_GET['img']"); }else if ($src_size{'mime'] === 'image/gif'){ imagegif($thumb, "thumbs/{$_GET['img']"); } header("location: thumbs/{@_GET['img']" } die(); if (is_dir('./thumbs') === false){ mkdir('./thumbs', 0744); } $images = glob('*.{jpg,jpeg,png,gif}', GLOB_BRACE); ?>|&{$image}\*"; }else{ echo "|&{$image}\*"; } } ?>Please help me out here or will you send me a link to somewhere (tut or something) that could help me write a new one but properly ??
Thanx,
Josh