Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> Problem z funkcja INCLUDE
tejek
post
Post #1





Grupa: Zarejestrowani
Postów: 41
Pomógł: 0
Dołączył: 12.11.2005

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


Witam,

Mam następujący problem. Chcem dodać jeen plik php za pomoca funkcji INCLUDE ale gdzy wpisze poniższy skrypt to nic mi na stronie nie wyświetla oprócz informacji o błedzie dlaczego? (IMG:http://forum.php.pl/style_emoticons/default/dry.gif)

  1. <tr>
  2. <th colspan="2" scope="col"><?php include('forum/index.php'); ?></th>
  3. </tr>


INFORMACJA KTÓA SIE POKAZUJE:
Cytat
Warning: main(./extension.inc) [function.main]: failed to open stream: No such file or directory in /home3/dealer/main/pkg/lif/fizjo/html/forum/index.php on line 25

Warning: main() [function.include]: Failed opening './extension.inc' for inclusion (include_path='.:/usr/share/php') in /home3/dealer/main/pkg/lif/fizjo/html/forum/index.php on line 25

Warning: main(./common.) [function.main]: failed to open stream: No such file or directory in /home3/dealer/main/pkg/lif/fizjo/html/forum/index.php on line 26

Warning: main() [function.include]: Failed opening './common.' for inclusion (include_path='.:/usr/share/php') in /home3/dealer/main/pkg/lif/fizjo/html/forum/index.php on line 26

Fatal error: Call to undefined function: session_pagestart() in /home3/dealer/main/pkg/lif/fizjo/html/forum/index.php on line 31

Z góry dziękuje za pomoc.

Pozdrawiam
Tejek
Go to the top of the page
+Quote Post
lopik
post
Post #2





Grupa: Zarejestrowani
Postów: 340
Pomógł: 0
Dołączył: 7.07.2006

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


include

"Proszę pamiętać o właściwym ustawieniu dyrektywy include_path."
Go to the top of the page
+Quote Post
tejek
post
Post #3





Grupa: Zarejestrowani
Postów: 41
Pomógł: 0
Dołączył: 12.11.2005

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


Nie wiem co ja zle robie jeśli dodawany plik php znajduje sie w tym samym folderze wszystko jest OK, ale jeśli tylko zostanie wrzucony do katalogu wszystko sie komplikuje :/ Jak zminiłem funkcje INCLUD na INCLUD_PATCH to teraz tylko wyskakujem i jeden blad o takiek treści:

Cytat
Fatal error: Call to undefined function: include_path() in /home3/dealer/main/pkg/lif/fizjo/html/forum.php on line 20


Co ty jest zle w ty kodzie niech mi ktoś pomoże:

  1. <html>
  2.  
  3. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  4.  
  5. <body>
  6. <table width="770" border="0" cellspacing="0" cellpadding="0">
  7. <tr>
  8. <th colspan="2" scope="col"><?php include("title.shtm"); ?></th>
  9. </tr>
  10. <tr>
  11. <th colspan="2" scope="col"><?php include_patch('forum/index.php'); ?></th>
  12.  
  13. </tr>
  14. <tr>
  15. <td colspan="2"><?php include("stopka.shtm"); ?></td>
  16. </tr>
  17. </table>
  18. </body>
  19. </html>
Go to the top of the page
+Quote Post
Cysiaczek
post
Post #4





Grupa: Moderatorzy
Postów: 4 465
Pomógł: 137
Dołączył: 26.03.2004
Skąd: Gorzów Wlkp.




normalnie uzywasz include(), a nie include_path() . Co do kodu. Czy istnieje katalog forum i plik index.php w tym katalogu? Sprawdź dobrze. Zauważ też, że bład występuje właśnie w pliku index.php w katalogu forum, więc chyba nie istnieje następny taki katalog?
Go to the top of the page
+Quote Post
tejek
post
Post #5





Grupa: Zarejestrowani
Postów: 41
Pomógł: 0
Dołączył: 12.11.2005

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


Napewno istnieje tan plik w tym katalogu juz wiele razy sprawdzałem. I nadal nic nie działa :/ Pomocy
Go to the top of the page
+Quote Post
quba
post
Post #6





Grupa: Zarejestrowani
Postów: 32
Pomógł: 0
Dołączył: 1.10.2005
Skąd: Olesno

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


bo pewno includujesz index.php, w którym zawarte są inne include'y juz.. Weź to na logike - jak odpalasz plik index.php to działa dobrze, bo ścieżki sie zgadzaja. Natomiast jak juz odpalasz z tego twojego 'stworzonego' pliku, to wtedy te includy z innego katalogu sie wykrzaczaja.
Go to the top of the page
+Quote Post
tejek
post
Post #7





Grupa: Zarejestrowani
Postów: 41
Pomógł: 0
Dołączył: 12.11.2005

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


Zminiłem jak mi radziłeś na INCLUDE i teraz wyskakuje mi taki błąd:

Cytat
Warning: main(./extension.inc) [function.main]: failed to open stream: No such file or directory in /home3/dealer/main/pkg/lif/fizjo/html/forum/index.php on line 25

Warning: main() [function.include]: Failed opening './extension.inc' for inclusion (include_path='.:/usr/share/php') in /home3/dealer/main/pkg/lif/fizjo/html/forum/index.php on line 25

Warning: main(./common.) [function.main]: failed to open stream: No such file or directory in /home3/dealer/main/pkg/lif/fizjo/html/forum/index.php on line 26

Warning: main() [function.include]: Failed opening './common.' for inclusion (include_path='.:/usr/share/php') in /home3/dealer/main/pkg/lif/fizjo/html/forum/index.php on line 26

Fatal error: Call to undefined function: session_pagestart() in /home3/dealer/main/pkg/lif/fizjo/html/forum/index.php on line 31


a zmieniony kod wyglada tak:

[php]
<html>
<body>
<table width="770" border="0" cellspacing="0" cellpadding="0">
<tr>
<th colspan="2" scope="col"><?php include('title.shtm'); ?></th>
</tr>
<tr>
<th colspan="2" scope="col"><?php include('forum/index.php'); ?></th>
</tr>
<tr>
<td colspan="2"><?php include('stopka.shtm'); ?></td>
</tr>
</table>
</body>
</html>

Prosze o pomoc.



Masz racje i jak to moge obejść, żeby wszystko dobrze działało??

Ten post edytował tejek 14.12.2006, 16:29:35
Go to the top of the page
+Quote Post
quba
post
Post #8





Grupa: Zarejestrowani
Postów: 32
Pomógł: 0
Dołączył: 1.10.2005
Skąd: Olesno

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


jak to jest phpbb, a na to wygląda, to pomanipulować zmienna $include_path.
Przed incude w tym twoium stworzonym pliku daj jakas zmienna uzupełniajaca sciezke i w pliku index.php dodaj ja do include_patha, tak zeby i odpalanie z includa i bezpośrednie odpalanie index.php nie nie wykrzaczało. Rusz głową (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)
Go to the top of the page
+Quote Post
tejek
post
Post #9





Grupa: Zarejestrowani
Postów: 41
Pomógł: 0
Dołączył: 12.11.2005

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


OK wielkie dzieki za pomoc bede probować (IMG:http://forum.php.pl/style_emoticons/default/winksmiley.jpg)
Go to the top of the page
+Quote Post

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: 25.08.2025 - 18:50