title: Fatal error: Allowed memory size. help please
body: <h2>Hello Guys please help me.</h2>
  
  <p>Here's my code,</p>
  
  <pre><code>Line 1 -    $imagename = $_FILES['file']['name'];
  Line 2 -    $source = $_FILES['file']['tmp_name'];
  Line 3 -    $target = "images/".$imagename;
  Line 4 -    move_uploaded_file($source, $target);
  Line 5 -
  Line 6 -    $imagepath = $imagename;
  Line 7 -    $save = "images/" . $imagepath; //This is the new file you saving
  Line 8 -    $file = "images/" . $imagepath; //This is the original file
  Line 9 -
  Line 10 -   list($width, $height) = getimagesize($file); 
  Line 11 -
  Line 12 -   $tn = imagecreatetruecolor($width, $height) ; 
  Line 13 -   $image = imagecreatefromjpeg($file); 
              imagecopyresampled($tn, $image, 0, 0, 0, 0, $width, $height, $width, $height) ; 
  
              imagejpeg($tn, $save, 80) ; 
  
              $save = "thumb_/" . $imagepath; //This is the new file you saving
              $file = "images/" . $imagepath; //This is the original file
  
              list($width, $height) = getimagesize($file) ; 
  
              $modwidth = 130; 
  
              $diff = $width / $modwidth;
  
        $modheight = 185; 
        $tn = imagecreatetruecolor($modwidth, $modheight) ; 
        $image = imagecreatefromjpeg($file) ; 
        imagecopyresampled($tn, $image, 0, 0, 0, 0, $modwidth, $modheight, $width,     $height) ; 
  
        imagejpeg($tn, $save, 80) ;
  </code></pre>
  
  <p><strong>I have error here.</strong></p>
  
  <p><strong><em>Fatal error:</em></strong> Allowed memory size of 134217728 bytes exhausted (tried to allocate 13056 bytes) in C:\xampp\htdocs\MagicLine\admin\cleo\cleo.php on line 13</p>