Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

lowercase and uppercase file name

I used codeigniter framework on my localhost, i named some of my models and controllers using the camel case method(UserModel,DbModel) on windows.Now when i uploaded the files to the server(running on linux) the script is trying to load all the files with all lowercase so i get 404 errors because the script is looking for usermodel not UserModel, any way to go around this ?

like image 436
andrei Avatar asked Feb 10 '11 19:02

andrei


1 Answers

Welcome to the 'pissed by crippled spl_autoload() implementation' club.

You basically can either

1.Rename all your files to lowercase

or

2.Write/find an autoloader that looks for proper filenames. Here's Symofony's ClassLoader Component which works great.

like image 200
Mchl Avatar answered Sep 24 '22 02:09

Mchl