Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> __autoload
nilfheim
post 18.04.2006, 13:47:36
Post #1





Grupa: Zarejestrowani
Postów: 8
Pomógł: 0
Dołączył: 5.04.2006

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


Mam pytanie:
Do czego sluszy funkcja __autoload()

dokladnie zostala uzyta w takim kodzie
  1. <?php
  2. function __autoload($class_name) {
  3.    require_once 'class/'.$class_name . '.cls.php';
  4. }
  5. ?>


A pochodzi on ze strony: http://www.phpclasses.org/browse/package/2956.html

EDIT:
Domyslam sie ze ma to ladowac klase automatycznie, ale jak wrzucilem skrypt na SERWER to powstalo mi
Fatal error: Cannot instantiate non-existent class: owarrior in
x:\\sciezka\easyphp1-8\www\index.php on line 5

Ten post edytował nilfheim 18.04.2006, 13:54:10


--------------------
Remember, remember the fifth of November
The gunpowder treason and plot.
I see no reason why gunpowder treason
Should ever be forgot.
Go to the top of the page
+Quote Post

Posty w temacie


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

 



RSS Wersja Lo-Fi Aktualny czas: 13.08.2025 - 23:24