I have this line of php code that sets the main folder of my site as the storage folder. How can I change this to the 'tmp' folder?
define('COOKIELOCAL', str_replace('\\', '/', realpath('./')).'/');
For example mysite.com, I want the files stay in mysite.com/tmp so I can clear this folder using a cron tab, any tips?
In other words what I need is to save the temp files created using this path in the 'tmp' folder instead the root one?
I'm not entirely sure why str_replace is being used like it is, but the following should work, while modifying the least from the code you originally posted:
This would also work:
Or, as has been suggested in another post: