Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link
URL Rewriter Bot
URL Rewriter Bot

This is the purpose of routing. Without proper rooting it is going to be quite difficult for you to work around this. The only thing I could think of right now is having controllers composed of a single word only and using ucfirst() on the URL segment. (It is actually the way I've chosen to go in my own framework as it is the fastest and least demanding)

So to answer your questions:

a) This depends on the type of system your server is running on. Under windows case doesn't matter, on linux it does so you have to keep that in mind. As to why it is behaving the way it is - Apparently classes in PHP are case insensitive. (Answered by MaximeMaxime)

b) You can solve that problem by using proper routing or having simple controller class names. Or, you could just use the correct case of the letters in the URL when it is not going to be typed in by users. There is also the option to have the file name in lowercase but then you are creating an inconsistency which - if one day you decide to implement autoloading - could bring you trouble, so kind of a bad idea but still a possibility.

Additionally, I have been down the road of creating my own framework as well and I could give you some other tips if you're interested.

This is the purpose of routing. Without proper rooting it is going to be quite difficult for you to work around this. The only thing I could think of right now is having controllers composed of a single word only and using ucfirst() on the URL segment. (It is actually the way I've chosen to go in my own framework as it is the fastest and least demanding)

So to answer your questions:

a) This depends on the type of system your server is running on. Under windows case doesn't matter, on linux it does so you have to keep that in mind. As to why it is behaving the way it is - Apparently classes in PHP are case insensitive. (Answered by Maxime)

b) You can solve that problem by using proper routing or having simple controller class names. Or, you could just use the correct case of the letters in the URL when it is not going to be typed in by users. There is also the option to have the file name in lowercase but then you are creating an inconsistency which - if one day you decide to implement autoloading - could bring you trouble, so kind of a bad idea but still a possibility.

Additionally, I have been down the road of creating my own framework as well and I could give you some other tips if you're interested.

This is the purpose of routing. Without proper rooting it is going to be quite difficult for you to work around this. The only thing I could think of right now is having controllers composed of a single word only and using ucfirst() on the URL segment. (It is actually the way I've chosen to go in my own framework as it is the fastest and least demanding)

So to answer your questions:

a) This depends on the type of system your server is running on. Under windows case doesn't matter, on linux it does so you have to keep that in mind. As to why it is behaving the way it is - Apparently classes in PHP are case insensitive. (Answered by Maxime)

b) You can solve that problem by using proper routing or having simple controller class names. Or, you could just use the correct case of the letters in the URL when it is not going to be typed in by users. There is also the option to have the file name in lowercase but then you are creating an inconsistency which - if one day you decide to implement autoloading - could bring you trouble, so kind of a bad idea but still a possibility.

Additionally, I have been down the road of creating my own framework as well and I could give you some other tips if you're interested.

added 232 characters in body
Source Link
php_nub_qq
  • 16.1k
  • 25
  • 84
  • 150

This is the purpose of routing. Without proper rooting it is going to be quite difficult for you to work around this. The only thing I could think of right now is having controllers composed of a single word only and using ucfirst() on the URL segment. (It is actually the way I've chosen to go in my own framework as it is the fastest and least demanding)

So to answer your questions:

a) This depends on the type of system your server is running on. Under windows case doesn't matter, on linux it does so you have to keep that in mind. As to why it is behaving the way it is - I have no ideaApparently classes in PHP are case insensitive. (Well not really an answer, huh?Answered by Maxime)

b) You can solve that problem by using proper routing or having simple controller class names. Or, you could just use the correct case of the letters in the URL when it is not going to be typed in by users. There is also the option to have the file name in lowercase but then you are creating an inconsistency which - if one day you decide to implement autoloading - could bring you trouble, so kind of a bad idea but still a possibility.

Additionally, I have been down the road of creating my own framework as well and I could give you some other tips if you're interested.

This is the purpose of routing. Without proper rooting it is going to be quite difficult for you to work around this. The only thing I could think of right now is having controllers composed of a single word only and using ucfirst() on the URL segment. (It is actually the way I've chosen to go in my own framework as it is the fastest and least demanding)

So to answer your questions:

a) This depends on the type of system your server is running on. Under windows case doesn't matter, on linux it does so you have to keep that in mind. As to why it is behaving the way it is - I have no idea. (Well not really an answer, huh?)

b) You can solve that problem by using proper routing or having simple controller class names. Or, you could just use the correct case of the letters in the URL when it is not going to be typed in by users.

Additionally, I have been down the road of creating my own framework as well and I could give you some other tips if you're interested.

This is the purpose of routing. Without proper rooting it is going to be quite difficult for you to work around this. The only thing I could think of right now is having controllers composed of a single word only and using ucfirst() on the URL segment. (It is actually the way I've chosen to go in my own framework as it is the fastest and least demanding)

So to answer your questions:

a) This depends on the type of system your server is running on. Under windows case doesn't matter, on linux it does so you have to keep that in mind. As to why it is behaving the way it is - Apparently classes in PHP are case insensitive. (Answered by Maxime)

b) You can solve that problem by using proper routing or having simple controller class names. Or, you could just use the correct case of the letters in the URL when it is not going to be typed in by users. There is also the option to have the file name in lowercase but then you are creating an inconsistency which - if one day you decide to implement autoloading - could bring you trouble, so kind of a bad idea but still a possibility.

Additionally, I have been down the road of creating my own framework as well and I could give you some other tips if you're interested.

Source Link
php_nub_qq
  • 16.1k
  • 25
  • 84
  • 150

This is the purpose of routing. Without proper rooting it is going to be quite difficult for you to work around this. The only thing I could think of right now is having controllers composed of a single word only and using ucfirst() on the URL segment. (It is actually the way I've chosen to go in my own framework as it is the fastest and least demanding)

So to answer your questions:

a) This depends on the type of system your server is running on. Under windows case doesn't matter, on linux it does so you have to keep that in mind. As to why it is behaving the way it is - I have no idea. (Well not really an answer, huh?)

b) You can solve that problem by using proper routing or having simple controller class names. Or, you could just use the correct case of the letters in the URL when it is not going to be typed in by users.

Additionally, I have been down the road of creating my own framework as well and I could give you some other tips if you're interested.