How to unlink file if exist in one folder but not another? |
I have got a resize function as shown in code below.
When it creates a new image it stores it in the images/cache/some_other_folder etc. It can be stored in multiple sub folders in my cache. PHP Code: $new_file = FCPATH . 'images/cache/' . $filename; $new_file would return something like PHP Code: string 'C:\wamp\www\project-2-upload/images/cache/catalog/windows_7_matrix-wallpaper-2400x1350.jpg' (length=90) Question: How ever if the cache image file exist but does not exist in the $old_file path then it should remove/unlink from the cache folders Any suggestions and examples? PHP Code: public function resize($filename, $width, $height) {
There's only one rule - please don't tell anyone to go and read the manual. Sometimes the manual just SUCKS!
|
Welcome Guest, Not a member yet? Register Sign In |