Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

php filemtime fails?

Avatar of Richard Korts
Richard KortsFlag for United States of America asked on
PHP
1 Comment1 Solution7 ViewsLast Modified:
I prepared a "cleanup" program to delete old unneeded files from a web server; it is set as a cron job to run on the First day of every month. To make sure is was working, I put a bunch of echo's into the program (see attached).

I get this for every file:

Warning: filemtime(): stat failed for /home/lakoshva/public_html/zips/29834zip.zip in /home/lakoshva/public_html/delete_old_files.php on line 21
file 29834zip.zip deleted, created 01/01/1970, size = 0.2399 MB

This is a minor point, I manually checked the affected directories & the files as desired are all gone.

What is wrong with my usage of filemtime()?

Thank you.

delete_old_files.php
ASKER CERTIFIED SOLUTION
Avatar of Ryan Chong
Commented:
This problem has been solved!
Unlock 1 Answer and 1 Comment.
See Answers