I'm having trouble writing a file in my private folder on my school's server. I've heard the problem is my rights. Or is it the code? I believe the folders location is correct. I get a few errors:
1    $testfile = "SchoolServer/Test.txt";
2           
3           if (!file_exists($testfile)) 
4           {
5               $fileoperation = "a";
6               $test = preg_replace( '/\h+/', ' ', $test);
7               $file = fopen ($testfile, $fileoperation);
8               fwrite ($file, $week . "\r\n" . $test . "\r\n" . "\r\n");
9               fclose ($file);
10          }
Warning: file_exists(): open_basedir restriction in effect. File(Test.txt) is not within the allowed path(s): (D:\SitesTemp) in D:\Register-test.php on line 3
Warning: fopen(): open_basedir restriction in effect. File(Test.txt) is not within the allowed path(s): (D:\SitesTemp) in D:\Register-test.php on line 7
Warning: fopen(Test.txt): failed to open stream: Operation not permitted in D:\Register-test.php on line 7
Warning: fwrite() expects parameter 1 to be resource, boolean given in D:\Register-test.php on line 8
Warning: fclose() expects parameter 1 to be resource, boolean given in D:\Register-test.php on line 9
Thanks!
 
     
    