Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP] Generator Postów.... Problem //
Rafee
post
Post #1





Grupa: Zarejestrowani
Postów: 21
Pomógł: 0
Dołączył: 2.11.2008

Ostrzeżenie: (0%)
-----


Witam..
Nie jestem dość dobry w php i mam problem o tóz znalazłem generator postów na forum...

adres: www.sankowia.pl/film.php

Zawartośc pliku film.php

Kod
<HTML>
   <HEAD>
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
     <meta http-equiv="Content-Language" content="pl" />
     <link rel="stylesheet" href="style.css" type="text/css" />
   </HEAD>
   <BODY>
  
   <?php
   $dane = "<table width=\"700\" border=\"1\" align=center><tr><td>Tytuł: $tytul
  
  </td> </tr> <tr> <td> Gatunek: $gatunek
  
  </td> </tr> <tr> <td> Ocena FilmWeb: $ocena
  
  </td> </tr> <tr> <td> Ok?adka:
  [center] [img]$link?[/img] [/center]
  
  </td> </tr> <tr> <td> OPIS: <font size=\"2\"> $opis </font>
  
  </td> </tr> <tr> <td> Pobierz film:
[link] $rapid[/link]</td> </tr> </table>";


$file = "film.txt";
$fp = fopen($file, "a");
flock($fp, 2);
fwrite($fp, $dane);
trim($dane);
flock($fp, 3);
fclose($fp);
?>

<center>



<form action="film.php" method="post">
   <table border=0 cellPadding=0 cellSpacing=0 width="800">
   <tr><td>
       <table align="center" width="100%">
          <tr><td align=right><B>Tytuł filmu:</td>

          <td><font face="verdana,arial" size="1"><textarea name="tytul" rows="1" cols="50"></textarea></td></tr>

          <tr><td align=right><B>Gatunek:</td>

          <td><font face="verdana,arial" size="1"><textarea name="gatunek" rows="1" cols="50"></textarea></td></tr>

          <tr><td align=right><B>Ocena FilmWeb:</td>

          <td><font face="verdana,arial" size="1"><textarea name="ocena" rows="1" cols="50"></textarea></td></tr>

          <tr><td align=right><B><B>Link do okładki:
<i>(http://*.jpg)</i> </td>

          <td><font face="verdana,arial" size="1"><textarea name="link" rows="1" cols="50"></textarea></td></tr>

          <tr><td align=right><B>Opis filmu:</td>

          <td><font face="verdana,arial" size="1"><textarea name="opis" rows="8" cols="50"></textarea></td></tr>

          <tr><td align=right><B>Linki:</td>


          <td><font face="verdana,arial" size="1"><textarea name="rapid" rows="5" cols="50"></textarea></td></tr>

          <tr><td colspan="2" align="center"><font face="verdana,arial" size="1"><input type="submit" value="Generuj zawartosc tematu"></td></tr>
        </table>
    </form>
    </td></tr></TABLE>
    

    <b><center>Skopiuj poniższy kod i wklej w miejsce postu:</center></b>
<textarea name="wklej" rows="5" cols="100%">
     <?php
   $fp = fopen("film.txt", "r");
     $tekst = fread($fp, 10000);
     echo $tekst;
     ?>
  </textarea>

<?php
$p = fopen('film.txt', w);
fwrite($p, '');
fclose($p);
?>
</BODY>
</HTML>


Natomiast film.txt dałem pusty...

I w zawartości nic mi się nie dodaje ;/ :(cały czas tak jak było... (IMG:http://forum.php.pl/style_emoticons/default/sad.gif)

Wie możne ktoś w czym jest błąd??


PS: skrypt znalazłem

Ten post edytował Rafee 2.11.2008, 12:33:20
Go to the top of the page
+Quote Post

Posty w temacie
- Rafee   [PHP] Generator Postów.... Problem //   2.11.2008, 12:30:59
- - webdice   Proszę poprawić bbcode.   2.11.2008, 12:32:37
- - Rafee   juz ok.... ktos ma pomysły ?   2.11.2008, 12:35:34


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 24.08.2025 - 00:37