note 113991 deleted from function.spl-autoload-register by tularis
| From: | tularis@php.net | Date: | Mon, 06 Jan 2014 11:48:37 +0000 |
| Subject: | note 113991 deleted from function.spl-autoload-register by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-198124@lists.php.net to get a copy of this message | ||
Note Submitter: hajo-p
----
if you have a dir-structure like "/abc/def/ghi", your index.php lies in the top directory,
but you want to use namespaces starting with "def" or "ghi":
you can switch the working directory of php with getcwd() and afterwards define + use your
namespaces with the simple spl_autoload_register() function without any arguments supplied.
remember that php handlers "cli" and "cli-server" are special cases.