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

Displaying Multidimensional Arrays...about to put my head in a vice, PLEASE HELP
I am fairly new to PHP and MySQL and I have a problem which I have been trying to resolve for days.

Can I call a class inside a function?
I have a class written in another file that handles my image resizing.

Can I do this (php say

Operating System
How in PHP or other language can I detect Operating system, ie Windows XP Home, Windows 7 Ultimate,

have trouble in a if condition
The if below is working ok, it check when indexes, name, zipcode and state are empty.
Code: &

php code to accept and delete incoming data
Using following HTML Code please show me how to write PHP code to accept and delete the incoming dat

Paypal
Hi all,

I have an advanced basic knowledge of php

I want to try something new for a s

Placing and array within an array then sorting it!
I have a page that runs two large mysql queries and saves the results into arrays, in php I then per

HOW to get the bind variables list.
I've the following problem : I've some SQL queries stored in my DB as VARCHAR2 values.
I need t

want to add a break after a certain amount of characters
i was wondering how to add a break in a blog post after a certain amount of characters... any idea o

Specific name typed, specific image shown on html page
Hello,

Fairly new to PHP and was curious if someone might know how to solve a fairly simple r

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