Problem with Case Sensitive

Asked

Viewed 177 times

-1

I am building a small application in MVC, for didactic purposes, I did most in Windows, when I passed my scripts to Elementary Os, many errors were appearing, including files and etc, these errors are due because of Case-Sensitive, what can I do to fix this?

  • I was searching and saw that in some forums that redirect urls with htaccess is a good one, but how do I do this?

  • 1

    Don’t do it. This is gambiarra of the worst kind, fix the mistake that is best. And the . htaccess would only work if it was, for example, all tiny on the hard drive. But still, you’d have trouble with #includes, which the . htaccess does not interfere.

2 answers

3

Basically, program the names and always write the same in both the source code and the files. The way, in your case, is to revise the code, and fix.

If it’s a "desperate measure," which is really your thing, put it all in the tiny, so you don’t have to think too much.

Keep camelcase only what is a third party library, but when it is updated, it will get complicated again.

Even, always avoid file names with accents and spaces, which are another source of problems.

Important: solutions that use .htaccess serve to arrange links that the end user who is browsing the site has typed with Casing wrong, and not to tidy up misspelled names by the system’s own author.

0

From a read on design patterns, there you will learn more about standardization in the writing of class names, where the first letter of each word begins with uppercase, and many others. By following these standards you will have no problem migrating your server systems. Remembering that all linux or linux based distributions are case sensitive, while windows is not.

  • Class names follow project patterns. There is a rule for writing class names as I said above, the first letter of each word should always start with uppercase letter. EX: class Usuariosativos.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.