![]() |
![]() |
![]() ![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 189 Pomógł: 1 Dołączył: 28.01.2008 Ostrzeżenie: (0%) ![]() ![]() |
Mam w PHP plik index.php, który wygląda tak:
Kod <?php $kolorTla = 'white'; include('class/generatorTresci.php?funkcja=deklaracjaDokumentu'); include('class/generatorTresci.php?funkcja=generujFormLog'); include('class/generatorTresci.php?funkcja=koniecDokumentu'); ?> I plik generatorTresci.php: Kod if ($_GET['funkcja'] == 'generujFormLog') {//tworzenie formularzu logowania print '<table border="0" cellpadding="5" cellspacing="5"> <tr> <td>'; print '<p class="zwyklytekstrid"><b>Witamy w strefie konsultanta. Podaj swoją nazwę użytkownika i hasło, aby się zalogować:</b></p>'; print "<form action=\"index.php\" method=\"POST\">"; print "<table><tr><td><p class=\"mala\">użytkownik: </p></td></tr><tr><td><input type=\"text\" name=\"uzytkownik\" value=\"".$_POST['uzytkownik']."\"></td></tr>"; print "<tr><td><p class=\"mala\">hasło: </p></td></tr><tr><td><input type=\"password\" name=\"haslo\"></td></tr></table>"; print ' <input type="submit" value="Zaloguj">'; print '</from>'; print '</table>'; print ' ';//formularz logowania } elseif ($_GET['funkcja'] == 'deklaracjaDokumentu') { print '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2"> <meta http-equiv="Reply-to" content="szymon.olewniczak@rid.pl"> <meta http-equiv="Content-Language" content="pl"> <meta name="author" content="Szymon Olewniczak"> <title>Wirtualny Pełnomocnik</title> <link rel="stylesheet" href="css/strefakon.css" type="text/css" /> </head> <body style="background-color: '.$kolorTla.'">'; } elseif ($_GET['funkcja'] == 'koniecDokumentu') { ?> </body> </html> <? } i gdy chcę uruchomić plik index.php PHP wyrzuca mi taki komunikat: Kod Warning: require_once(class/generatorTresci.php?funkcja=deklaracjaDokumentu) [function.require-once]: failed to open stream: No such file or directory in /opt/lampp/htdocs/Rid/wirtualny_pelnomocnik/index.php on line 10 Fatal error: require_once() [function.require]: Failed opening required 'class/generatorTresci.php?funkcja=deklaracjaDokumentu' (include_path='.:/opt/lampp/lib/php') in /opt/lampp/htdocs/Rid/wirtualny_pelnomocnik/index.php on line 10 Czy ktoś wie gdzie popełniłem błąd? |
|
|
![]() ![]() |
![]() |
Wersja Lo-Fi | Aktualny czas: 18.07.2025 - 02:36 |