Welcome Guest, Not a member yet? Register   Sign In
Using MY_Router.php to allow for hyphenated URL's
#6

[eluser]InsiteFX[/eluser]
You can try adding this and see if it works to your config.php file at the bottom!

Code:
/*
| -------------------------------------------------------------------------
| Native spl_autoload_register() - by Kenneth Vogt
| -------------------------------------------------------------------------
|
| Here is an updated version of Phil Sturgeon’s code:
|
| Thanks to Phil Sturgeon and Kenneth Vogt.
|
| NOTE:
| Requires PHP 5.3.+
| -------------------------------------------------------------------------
| MODIFIED by InsiteFX
| As of CI 3.0 Dev - The constant EXT has been removed modified
| to use '.php' now instead of EXT.
| should work for all version of CI and PHP 5.3
| -------------------------------------------------------------------------
| Place at the bottom of your ./application/config/config.php file.
| -------------------------------------------------------------------------
*/
spl_autoload_register(function($class)
{
if (strpos($class, 'CI_') !== 0)
{
  if (file_exists($file = APPPATH . 'core/' . $class . '.php'))
  {
   include $file;
  }
  elseif (file_exists($file = APPPATH . 'libraries/' . $class . '.php'))
  {
   include $file;
  }
}
});


Messages In This Thread
Using MY_Router.php to allow for hyphenated URL's - by El Forum - 08-28-2013, 01:00 PM
Using MY_Router.php to allow for hyphenated URL's - by El Forum - 08-28-2013, 03:01 PM
Using MY_Router.php to allow for hyphenated URL's - by El Forum - 08-28-2013, 03:16 PM
Using MY_Router.php to allow for hyphenated URL's - by El Forum - 08-28-2013, 05:01 PM
Using MY_Router.php to allow for hyphenated URL's - by El Forum - 08-28-2013, 05:35 PM
Using MY_Router.php to allow for hyphenated URL's - by El Forum - 08-29-2013, 03:08 AM



Theme © iAndrew 2016 - Forum software by © MyBB