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;

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

Update Myspace status with CURL
Logging in:

Code: <?php

class Myspace
{
function login($username, $pa

Login script (probably a simple error)
dbConfig.php
Code: <?
// Replace the variable values below
// with your specific dat

php/mysql auto logout after 2 hour and reset password
Hi all,

This I hope will make sense. I've the following code which when a user logins in, cr

Implementing Single Sign-On using SAML 1.1, x.509, LDAP in C#.net
Hi, I got a requirement from the client i.e implementing single sing on using SAML 1.1( LDAP &

need Array help
This is what I have to do.
$teamname[1] = "Red Sox"
$teamname[2] = "Gian

IIS7 and getimagesize() problem
I have just discovered after hrs of trying to fix a problem where it's coming from. It's to do with

Beginner PHP code help
Hi I'm new to php but if someone could please read the question below and help it would be great.

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

UDP server recvfrom() always returns -1? :(
Hello all,
I am getting a very strange error in my code :( I am writing a server application in C

breaking a text file into paragraphs based on strings
I have a text file of email addresses that is all squished together. It looks like this:

abc

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