[ Valerij Zajcev @ 09.07.2010. 13:13 ] @
Koristim PHP verziju 5.3.1 i dobijam sledecu gresku kada radim sa namespace-ovima. Citat: Warning: The use statement with non-compound name 'testClasses' has no effect in C:\wamp\www\demo02\index.php on line 2 This is namespace testing Fatal error: Class 'testClasses\Test' not found in C:\wamp\www\demo02\index.php on line 6 Prema ovom bug report-u trebalo bi da radi, a ne verujem da ima neka sintaksna greska. Ima li neko ideju? Test.php Code: namespace testClasses; class Test { function __construct() { echo "Test class constructor from testClasses namespace!"; } function getName($name) { return $name . " new user!"; } } index.php Code: use testClasses; echo "<h1>This is namespace testing</h1> <br/>"; $t1 = new testClasses\Test(); $t1->getName("vlada"); |