Welcome Guest, Not a member yet? Register   Sign In
Multiple Controllers
#6

[eluser]WanWizard[/eluser]
The router does a file_exists() check using the name specified in the URI.

So if you request http://hostname/nsba_login/method, it will check for a file called nsba_login.php. If your file is called NSBA_login.php, it will find it on Windows (because the filesystem is case insensitive), it will fail on linux (filesystem is case sensitive).
As a standard practice, ALWAYS use lowercase filenames.

As for the class name, the same applies. The router class doesn't do conversions, it uses the same URI segment to instantiate the controller class.
Fortunately, while variable names in PHP are case sensitive, class names are not, so you can get away with a controller class NBSA_login.


Messages In This Thread
Multiple Controllers - by El Forum - 09-07-2010, 12:12 PM
Multiple Controllers - by El Forum - 09-07-2010, 12:15 PM
Multiple Controllers - by El Forum - 09-07-2010, 12:21 PM
Multiple Controllers - by El Forum - 09-07-2010, 04:34 PM
Multiple Controllers - by El Forum - 09-08-2010, 04:21 AM
Multiple Controllers - by El Forum - 09-08-2010, 07:21 AM



Theme © iAndrew 2016 - Forum software by © MyBB