I am using php function unlink() as you most probably assumed but it seems to be giving me a false negative... It gives me this warning:
Warning: unlink(/home/blackboa/public_html/classes/lib/test.lang) [function.unlink]: No such file or directory in /home/blackboa/public_html/modules/lang_manage/main.php on line 41
But the file does get deleted.
Here is the php code for the specific function:
function delete_lang_file($file){
if(preg_match('#\.lang#', $file) && !preg_match('#blank\.lang#', $file)){
unlink(CLASSES_PATH."lib/".$file);
}
}
There is no existing file handlers when this function is executed however file_get_contents() and an fopen() fwrtie() and fclose() set are used in other functions which are never called in the same execution of unlink().
Is there anything I am doing wrong, forward slash instead of backslash maybe?
Thanks,
Fraser K