I have been writing to a file in the same directory as the script with no problems. Then when it came to writing to a file in the subdirectory it failed. the code I used is here..
$destinationfile = "./".$teacherid."/template.csv";
$handle = fopen($destinationfile,"w+");
echoing $destination file gives... ./1/template.csv
and echoning the $handle gives nothing in the subdirectory case and a resource with number when working in the same directory..
I have also tried the path written as /1/template.csv but no luck either
Any tips anyone? Thanks