include('engine/start.php'); $wyloguj = ('<a href="admin_login.php">TUTAJ</a>'); if($_SESSION['logged'] == 1){ } elseif($wyloguj){ $_SESSION['logged'] = 0; echo ('Nie jestes zalogowany! Zaloguj sie <a href="admin_login.php">TUTAJ</a> aby napisac Newsa! '); } ?> <html> <head> <meta http-equiv="content-type" content="text/html; charset=windows-1250"> <meta name="generator"> <title>System News by Adikus</title> </head> <body> <form action="news.php" method="POST"> <center><table><tr><td><p>Tytul: <input type="text" size="25" name="your_tytul" /></p><br> <p>Tresc newsa:<br> <textarea name="your_news" rows="10" cols="50"></textarea></p><br></center></tr> <p><tr><td></td><td>Podpis:</td><td><input type="text" size="20" name="your_podpis"></td> </tr> <tr><td></td><td><p>Data:</td><td><input type="text" size="20" name="your_data"></td></tr></p> </table> <table><tr><td><input type="submit" name="ok" value="Wyslij" /></td> <td><input type="reset" value="Wyczysc" /></td></tr></table> <?php if($_SESSION['logged'] == 1){ $tytul = ('<p class="newsTyt">:: '.$_POST['your_tytul'].'</p>'); $wiadomosc = ('<p class="newsTresc">' .$_POST['your_news'].'</p>'); $podpis = ('<p class="newsPodpis">' .$_POST['your_podpis'].', '); $data = ($_POST['your_data'].'</p><br>'); if($_POST['your_tytul'] && $_POST['your_news'] && $_POST['your_podpis']){ $error = false; $error = true; } $error = true; } $error = true; } $error = true; } if ($error == false) { $sprawdz = ('$tytul, $wiadomosc, $podpis, $data'); if($sprawdz){ }else{ } } }else{ } } } ?> </div> <?php include('engine/koniec.php'); ?>
Wczesniej dzialalo a dzisiaj probuje dodac newsa i pisze:
Warning: fopen(/home/adikus/domains/polish-frags.pl/public_html/news.txt) [function.fopen]: failed to open stream: Permission denied in /home/adikus/domains/polish-frags.pl/public_html/news.php on line 64
Warning: fwrite(): supplied argument is not a valid stream resource in /home/adikus/domains/polish-frags.pl/public_html/news.php on line 66
Warning: fwrite(): supplied argument is not a valid stream resource in /home/adikus/domains/polish-frags.pl/public_html/news.php on line 67
Warning: fwrite(): supplied argument is not a valid stream resource in /home/adikus/domains/polish-frags.pl/public_html/news.php on line 68
Warning: fwrite(): supplied argument is not a valid stream resource in /home/adikus/domains/polish-frags.pl/public_html/news.php on line 69
Warning: fwrite(): supplied argument is not a valid stream resource in /home/adikus/domains/polish-frags.pl/public_html/news.php on line 70
Warning: fclose(): supplied argument is not a valid stream resource in /home/adikus/domains/polish-frags.pl/public_html/news.php on line 71
News zostal dodany
Jak to naprawic?
Prosze o pomoc.
Pozdrawiam.