Unlink if you can unlink
-
In a russian forum I found this PHP code:
if (unlink("../news_photos/smalls/".$filename_old) == TRUE) { unlink("../news_photos/smalls/".$filename_old); }
-
Copy/Paste, Copy/Paste, Copy/Paste... :D
And of course, always compare with true and never with 0 (zero).
After all, who the hk ever reads the f***g manuals?
-
Maybe he or she was trying to do it like this:
if (unlink("../news_photos/smalls/".$filename_old) == TRUE BUT DON'T UNLINK IT YET, STUPID) { unlink("../news_photos/smalls/".$filename_old) NOW!!!;
}
He or she missed the "Do What I Mean, Not What I Say" operators.
Oh, they haven't been invented yet. :P