Namespace Problem


Posted on 16th Feb 2014 07:03 pm by admin

I'm having problem with a section of code with a variable namespace.

This code works fine:
Line number On/Off | Expand/Contract $c = new AppsAdminViewsIndex;
Did you know?Explore Trending and Topic pages for more stories like this.

However this code does not:
Line number On/Off | Expand/Contract echo $val[1];// Outputs AppsAdminViewsIndex; $c = new $val[1] //( ! ) Fatal error: spl_autoload() [function.spl-autoload]: Class AppsAdminViewsIndex could not be loaded in C:wampwww_devRainUrlsRouter.php on line 69

My "autoloader" (PHP handles namespace autoloading automatically):

Line number On/Off | Expand/Contract spl_autoload_extensions(".php");spl_autoload_register();

I've trawled through the manual with no luck..
No comments posted yet

Your Answer:

Login to answer
282 Like 26 Dislike
Previous forums Next forums
Other forums

PHP hyperlinks generator - HELP plz
Hi

I need some help to get this done using php:


1 - I have few hyperlinks say 500

Redirect not working after making a POST/GET
Hi Everyone,

I am a novice in PHP. Here I have 2 pages, one page with a textbox and button an

mysql_query returning boolean instead of mysql ressource
Hi,

I seem to have a weird issue with the php command mysql_query. I pass 2 arguments the que

need help modifying script
Hi guys,

I'm fairly new to php and am having a bit of trouble modifying a script.

This

pspell
using pspell, is it possible to get words that would be best in the current phrase?

For examp

Why does first ever HttpSendRequest take longer?
I promise this isn't as simple as it sounds. I'm wondering why the the first ever call to HttpSendRe

Error in Configure System Landscape Directory phase
Hi

We are getting the error in Configure SLD phase ( 41 of 44 phase).

Please f

How to convert this array to string
I am having problems converting this array to a string
using print_r($val[1]); I get:
Code: [

ok i need to join all this pages to make 1 neat code
i have 5 pages that make up my tv guide it works 100% but i want to make it 1 page if i can or 2, i

This must be easy , pulling the last record of the day, every day, from a txt
I have a txt file logging weather data every minutes (so 1 record per minute). I want to extract the

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash