My Following code is working fine when I set
$target = \"size_images/14_20131216231522_cashew.jpg\";
But Not Working
It has to be a relative path.. absolute path would not work.
Also make sure that you know the difference between "/" and "./" But I would strongly recommend to either use configuration variables(in case of framework) OR constants to store file path.
Former point to root and later point to current directory..