I am trying to use chdir inside a function which writes & saves a file. If I try to write the file to a nearby folder e.g. 'bins' like so:
$location = 'bins';
chdir($location);
then it works fine and the files are written and placed into the bins folder. The problem I have is that I need to save the files onto a different drive like so:
$location = 'I:/directory/test/'
chdir($location);
but when I use an absolute path like above I get this error message:
Warning: chdir(): No such file or directory (errno 2) in index.php on line 586
Could someone explain what I'm doing wrong and how I can fix it please?
Thanks for any help