Hi,

Please tell me what's wrong with the following snippet of code.


[phpcode]

<?php

$total=100;
$a=fopen("Thankyou.txt","w");
fwrite($a,$total);
fclose($a);

?>

[/phpcode]

I have got the following error messages:

Warning: fopen(Thankyou.txt): failed to open stream: Permission denied in /home/amitnet/public_html/test.php on line 4

Warning: fwrite(): supplied argument is not a valid stream resource in /home/amitnet/public_html/test.php on line 5

Warning: fclose(): supplied argument is not a valid stream resource in /home/amitnet/public_html/test.php on line 6


Please help.

Thank you very much for help in advance.