panique / mini

Just an extremely simple naked PHP application, useful for small projects and quick prototypes. Some might call it a micro framework :)
1.35k stars 479 forks source link

Problem with case sensitive controller names #212

Closed rsmmukesh closed 8 years ago

rsmmukesh commented 8 years ago

consider the situation controller name is "ErrorController" and it has an action "index". from the localmachine there is no problem, working for the url "localhost\phpminisolution\Error" and "localhost\phpminisolution\error" , then i hosted it in a linux machine , it is not working for "localhost\phpminisolution\error". i found the problem it fails in the situation "elseif (file_exists(APP . 'controller/' . $this->url_controller . '.php')) " in application.php . can you suggest me a solution as soon as possible?

vian commented 8 years ago

Use lowercased controller filenames: 'error.php', 'articles.php', and change the line in question to "else if (file_exists(APP . 'controller/' . mb_strtolower($this->url_controller) . '.php')) "