Gossamer Forum
Home : General : Internet Technologies :

PHP: UNLINK/Cron

Quote Reply
PHP: UNLINK/Cron
Hi all,

I have an issue pertaining to running a PHP script via Cron. The script has run fine up until a couple weeks ago. I notice that the reason that the script has not been totally working is that the temp email files were not being deleted when running via Cron. When I run the script via the browser, the script runs, including the deletion of the temp email files (using them for HTML dynamically formatted mass email messages).

Anyway, I was using the following codes:

Code:
unlink("../includes/templates/emails/files/" . $my_check_file_name);

which worked fine via the browser. But didn't delete the files when execuited via Cron.

So, I changed the codes to the following:

Code:
unlink($_SERVER['DOCUMENT_ROOT'] . "/includes/templates/emails/files/" . $my_check_file_name);

Still works via the browser, but wanting to confirm whether this will work via Cron, just looking for confirmation rather than testing it via Cron, which is more time consuming. ;)

Thanks in advance.
========================================
Buh Bye!

Cheers,
Me
Subject Author Views Date
Thread PHP: UNLINK/Cron Stealth 5299 Sep 19, 2003, 11:58 AM
Thread Re: [Stealth] PHP: UNLINK/Cron
Andy 5144 Sep 19, 2003, 12:01 PM
Thread Re: [Andy] PHP: UNLINK/Cron
Stealth 5110 Sep 19, 2003, 12:04 PM
Post Re: [Stealth] PHP: UNLINK/Cron
Andy 5146 Sep 19, 2003, 12:05 PM