0

This is the code which below,

$posts= array(array(
        'name'=> $v1t1,
        'y'=> $principal,
        'color'=> $v1c1              
        ),
        array(
             'name'=> $v2t2,
             'y'=> $mi,
             'color'=> $v2c2                 
          ),

          array(
             'name'=> $v5t5,
             'y'=> $insurance,
             'color'=> $v5c5                 
          )
    );

$response = $posts;

$fp = fopen('conv_results.json', 'w');
fwrite($fp, json_encode($response));
fclose($fp);

This code perform perfectly in localhost and linux server.

But in windows server, it display error which is

Warning: fopen(fha_results.json) [function.fopen]: failed to open stream: Permission denied in E:\kunden......\FHA_Json_HC.php on line 63.

Please help me, How can i solve it?

Funk Forty Niner
  • 74,372
  • 15
  • 66
  • 132
MD. ABDUL Halim
  • 712
  • 3
  • 11
  • 31
  • Of course a permission issue. Possible duplicate: http://stackoverflow.com/questions/8103860/move-uploaded-file-gives-failed-to-open-stream-permission-denied-error-after – Amal Murali Sep 05 '13 at 15:23
  • 1
    Grant your web server permission to read and write files in that location – Anigel Sep 05 '13 at 15:26
  • I went to create a graph using that json file. Others perform perfectly without json file open.Please help me . I think that it is not duplicate. – MD. ABDUL Halim Sep 05 '13 at 15:27

0 Answers0