Jump to content

unlink() problem


haris244808

Recommended Posts

im trying to delete 2 files but the unlink function doesnt delete them

any suggestion

 

here is function im using:

 

public function place_delete(){

 

$cityPlace_UploadDir = $this->cityPlace_Dir . $this->place_main_photo_name;

$cityPlace_UploadThumbDir = $this->cityPlace_thumbsDir . $this->place_main_photo_name;

if(unlink($cityPlace_UploadDir)){

if(unlink($cityPlace_UploadThumbDir)){

//DELETE some sql values

  return (mysql_affected_rows() == 1) ? true : false;

}

else{

return false;

}

}

else{

return false;

}

}

Link to comment
https://forums.phpfreaks.com/topic/268453-unlink-problem/
Share on other sites

Have you done any debugging yet? Printed out values and made sure they're right? Made sure your php.ini has

error_reporting = -1
display_errors = on

and looked for error messages?

 

here are the configs in php.ini:

i debuged and it shows no error. I am using classess. I get a file name and directory to another function and assign them to those values inside unlink() function 

 

error_reporting = E_ALL | E_STRICT


; error_reporting
;   Default Value: E_ALL & ~E_NOTICE
;   Development Value: E_ALL | E_STRICT
;   Production Value: E_ALL & ~E_DEPRECATED

; display_errors
;   Default Value: On
;   Development Value: On
;   Production Value: Off

 

Link to comment
https://forums.phpfreaks.com/topic/268453-unlink-problem/#findComment-1378564
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.