[thelist] free tip (I'm sure I owe)

Tony Crockford tonyc at boldfish.co.uk
Tue Oct 1 10:47:00 CDT 2002


<tip subject="Warning re PHP recursive deletion" author="Tony in tears
Crockford"

When you are testing PHP scripts that "unlink" files according to a
regular expression template and using DOCUMENT_ROOT as a start point, do
one of two things:  make sure your PHP editor doesn't run a preview from
anywhere other than the same place as you've saved your file and/or
comment out the unlink and replace it with "echo filename" until you're
sure the process is working correctly.

Otherwise you may find, like I did that you set off a program that works
recursively through your hard disk, deleting all your .htm files,
luckily mine started in the C:\Apache\htdocs directory for which I have
a backup....

</tip>

--
http://www.maccaws.org/
[Making A Commercial Case for Adopting Web Standards]




More information about the thelist mailing list