Hello. I'm trying to delete a directory that temporarily holds files for about 24 hours.
I setup a cron job with this command
/usr/local/bin/php/home/gmtrashx/public_html/purge.php 2>&1 >> /home/gmtrashx/public_html/cron_output.log
The file paths for the cron job should be correct. I'm new to php and such so that might be my issue
<?php
$files = glob('./usrupload/server/php/*');
foreach($files as $file){
if(is_file($file))
unlink($file);
}
?>
That's ^ my php for deleting files in the temporary directory.
The cron_job.log seems to be empty aswell.
I setup a cron job with this command
/usr/local/bin/php/home/gmtrashx/public_html/purge.php 2>&1 >> /home/gmtrashx/public_html/cron_output.log
The file paths for the cron job should be correct. I'm new to php and such so that might be my issue
<?php
$files = glob('./usrupload/server/php/*');
foreach($files as $file){
if(is_file($file))
unlink($file);
}
?>
That's ^ my php for deleting files in the temporary directory.
The cron_job.log seems to be empty aswell.