Forum Moderators: coopster
if( !unlink( $image ) ) {
die( 'Could not delete the image file.' );
} However I'm getting the following error:
Warning: unlink() [function.unlink]: Unable to locate stream wrapper in ***/wallpaper-existing/index.php on line 80 I'm using the correct full path to the image, so perhaps this issue is related to permissions? Currently the owner of the image file is the FTP user.
Any help would be appreciated :)
I'm not so certain you are even getting to the permissions part of this operation as the message seems to be stating an issue in regards to the stream wrapper [php.net].
What is in the value of $image?
print '<pre>'; var_dump($image); print '</pre>'; exit;
if( !unlink( $image ) ) {
die( 'Could not delete the image file.' );
}