![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 602 Pomógł: 30 Dołączył: 1.08.2007 Skąd: Nowy Sącz Ostrzeżenie: (0%) ![]() ![]() |
Witam, mam problem, jeśli w nagłówku 1 funkcji podaję 5 argumentów(Singleton::instance('KlasaTest', $arg1, $arg2, $arg3, $arg4, $arg5)(IMG:http://forum.php.pl/style_emoticons/default/winksmiley.jpg) to jak mam przekazać te 5 argumentów($arg[1-5]) do instancji klasy new $class ($args).
Próbowałem zrobić tak
|
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 4 Pomógł: 0 Dołączył: 22.08.2008 Ostrzeżenie: (0%) ![]() ![]() |
A to błędy Kod [b]Warning[/b]: Missing argument 1 for Test::__construct(), called in D:\Program Files\WebServ\httpd\test.php on line 19 and defined in [b]D:\Program Files\WebServ\httpd\test.php[/b] on line [b]10[/b]
[b]Warning[/b]: Missing argument 2 for Test::__construct(), called in D:\Program Files\WebServ\httpd\test.php on line 19 and defined in [b]D:\Program Files\WebServ\httpd\test.php[/b] on line [b]10[/b] [b]Warning[/b]: Missing argument 3 for Test::__construct(), called in D:\Program Files\WebServ\httpd\test.php on line 19 and defined in [b]D:\Program Files\WebServ\httpd\test.php[/b] on line [b]10[/b] [b]Notice[/b]: Undefined variable: arg1 in [b]D:\Program Files\WebServ\httpd\test.php[/b] on line [b]12[/b] [b]Notice[/b]: Undefined variable: arg2 in [b]D:\Program Files\WebServ\httpd\test.php[/b] on line [b]12[/b] [b]Notice[/b]: Undefined variable: arg3 in [b]D:\Program Files\WebServ\httpd\test.php[/b] on line [b]12[/b] :: [b]Catchable fatal error[/b]: Object of class Test could not be converted to string in [b]D:\Program Files\WebServ\httpd\test.php[/b] on line [b]19[/b] |
|
|
![]() ![]() |
![]() |
Aktualny czas: 14.10.2025 - 06:12 |