Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Funkcja której nie ma, a tek serio jest..., Czyli php które nie widzi funkcji...
therifler
post
Post #1





Grupa: Zarejestrowani
Postów: 10
Pomógł: 0
Dołączył: 2.04.2004
Skąd: Warszawa

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


Myślałem że wywale przy tym... Normalnie to nigdy nie miałem takiego problemu.... Nie wiem co teraz się stało ale szook...

A teraz do rzeczy : (IMG:http://forum.php.pl/style_emoticons/default/aarambo.gif)

mam pewien skrypt który posiada plik index.php
  1. <?
  2. include('config.php');
  3. include($domain.'include/header.php');
  4. include($domain.'include/logon.php');
  5. include($domain.'include/templates.php');
  6. include($domain.'include/emots.php');
  7. include($domain.'include/render.php');
  8.  
  9. render();
  10.  
  11. include($domain.'include/footer.php');
  12. ?>


później plik render.php w katalogu include
  1. <?
  2. function render()
  3. {
  4. global $domain;
  5. $template='test';
  6. $file=include($domain.'/templates/'.$template.'/index.html');
  7. $rendered=str_replace('<!-- LOGON -->','logowanie',$file);
  8. echo $rendered;
  9. }
  10. ?>


a teraz gwóźdź programu (IMG:http://forum.php.pl/style_emoticons/default/aaevil.gif)

Kod
Fatal error: Call to undefined function: render() in /home/michal2/public_html/therifler/testcms/index.php on line 9


Nie widzi funckcji render która znajduje się w pliku render.php który z resztą jest dołączany do index.php (IMG:http://forum.php.pl/style_emoticons/default/biggrin.gif) weźcie mi powiedzcie gdzie tu błąd bo z kolegom już omało się o to nie pozabijaliśmy (IMG:http://forum.php.pl/style_emoticons/default/biggrin.gif) pozdrovionka (IMG:http://forum.php.pl/style_emoticons/default/biggrin.gif)

---
jak ktoś kto mi odpowie dobrze jest z Częstochowy to ma broVarka u mnie (IMG:http://forum.php.pl/style_emoticons/default/biggrin.gif)
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
dr_bonzo
post
Post #2





Grupa: Przyjaciele php.pl
Postów: 5 724
Pomógł: 259
Dołączył: 13.04.2004
Skąd: N/A

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


Mozliwe, wiki.php.pl:
Cytat
Obie instrukcje są identyczne, z jednym wyjątkiem dotyczącym obsługi błędów. Jeżeli nie uda się wykonać include, zostanie wygenerowany błąd typu Warning, ale skrypt będzie wykonywany dalej. Jeżeli natomiast nie uda się wywołanie require, zostanie wygenerowany błąd typu Fatal Error, co pociągnie za sobą zatrzymanie wykonywania skryptu.


@therifler: moze masz zly poziom reportowania bledow (jesli dostajesz tylko Fatala): ustaw
error_reporting( E_ALL )
i sprawdz to jeszcze raz

Ten post edytował dr_bonzo 11.05.2005, 10:21:45
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: 13.10.2025 - 22:22