Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP / SQL] Problem z funkcja include()
Posio
post
Post #1





Grupa: Zarejestrowani
Postów: 417
Pomógł: 44
Dołączył: 23.06.2011

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


Mój kod:

  1. <?php
  2. define('_TYLKO_INCLUDE', TRUE);
  3. require("config.php"); require("connect.php");
  4.  
  5. if(isset($_GET['id'])){
  6.  
  7. $zapytanie = mysql_query('select * from `panels` WHERE `id`='. $_GET['id'] . '');
  8. while($rekord = mysql_fetch_assoc($zapytanie))
  9.  
  10. $image = $rekord['image'];
  11. $sciezka = $rekord['sciezka'];
  12.  
  13.  
  14. echo '<div id="panel">
  15. <table width="100%" height="50px" background="'.$image.'">
  16. <tr>
  17. <td></td>
  18. </tr>
  19. </table>
  20. <table width="100%" height="auto">
  21. <tr>
  22. <td>';
  23. include ($sciezka);
  24. echo '</td>
  25. </tr>
  26. </table>
  27. </div>';
  28. }
  29. ?>


I rozchodzi mi o to, że nie includuje mi ($sciezka), chyba ze usune $image z tła tabeli. Błąd wygląda tak:
Kod
Warning: include() [function.include]: Failed opening '' for inclusion (include_path='.;C:\php5\pear') in D:\Program Files (x86)\WebServ\httpd-users\New Project\panel.php on line 31
Go to the top of the page
+Quote Post

Posty w temacie


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: 26.09.2025 - 20:20