Christopher Brown - Sat, 26/11/2022 - 10:18

Permalink

Can understand switching to current directory to run scripts / includes within one folder ... but what about when you need to access folders OUTSIDE of the current directory? Let's say I am in "/cgi-bin/sales/sales_cron.php", and now wish to access a file in "/cgi-bin/track/data/this,dat"

Offline testing, I used "getCWD", and then broke it apart / reconstructed to get back to cgi-bin (/home/domain/cgi-bin/). I then append that to the other file ("/home/domain/cgi-bin/"."track/data/this.dat") ... but not sure if "getCWD" will work like this on CRON

Or should I use some other method?

CAPTCHA