Jump to content

stalkmadude

New Members
  • Posts

    4
  • Joined

  • Last visited

stalkmadude's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. That's not what I meant I meant I want to avoid typing the above code for every new class, something like Zend Framework.
  2. Thanks Jayson for the help, WIth that would I be able to avoid writing new for each classes?
  3. I've given a try by moving to __construct but no luck. Could you please explain with small demo? Edit: I think i got it working Could you explain me a method so that I don't need to keep writing new ClassName everytime?
  4. Hello, I'm having hard time with spl_autoload_register function specially when its inside a class. I would appreciate any help This is my index.php <?php require('./loadclasses.php'); ?> loadclasses.php <?php class loadclasses { function autoLoader($className) { $fileName = str_replace("_", PATH_SEPARATOR, $className); include($fileName); } spl_autoload_register('autoLoader'); } But i keep getting this error Parse error: syntax error, unexpected 'spl_autoload_register' (T_STRING), expecting function (T_FUNCTION) in d:\xampp\htdocs\welcomemanager\loadclasses.php on line 11 I am running php 5.4 version on xmapp thanks again!
  5. hello everyone im new member here willing to learn
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.