Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
Node is saved as draft in My Content >> Draft
  • Deleting file from folder in cakephp 2.X

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 10
    Comment on it

    Simple code to delete image from the img folder .

      App::uses('File', 'Utility');
    
        $imgpath = ' 'img/downloads/myimg.jpg'';
        $det = new File(WWW_ROOT .$imgpath , false, 0777);
        if($det->delete()) {
           echo 'Image is deleted';
        }
    
    iphone cakePhp

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: