hi i am following this etutorial and the code is not working and dont get why. There are two bits of code:
>
<body>
<?
$sonnet76 = <<<HERE
Sonnet # 76, William Shakespeare
Why is my verse so barren of new bride,
And keep invention in a noted weed,
HERE;
$fp = fopen("sonnet76.txt", "w");
fputs($fp, $sonnet76);
fclose($fp);
?>
When i click this file i get permision denied and it wont write even thou i have allowed all the permisions.
<body>
<?
$fp = fopen("saveSonnet.php", "r");
//first line is title
$line = fgets($fp);
print "<center><h1>$line</h1></center>\n";
print "<center>\n";
//print rest of sonnet
while (!feof($fp)){
$line = fgets($fp);
print "$line <br>\n";
}
print "</center>\n";
fclose($fp);
?>
This code returns the other except it does not show the code it is all hidden. Thanks you could give me any information about what is happening and if i am doing it wrong.