frenesim
frenesim

Reputation: 703

Turning php to very strict

I would like to configure my environment (php.ini and apache) to be as strict as possible. for example:

Given a class in path c:\xampp\htdocs\test\classes\My.Class.php

I would like that

include('\classes\my.class.php'); 

to fail. (even on windows)

And I would like that

include('./classes/My.Class.php');

to joy. case sensitive

The main reason is that appfog is strict with paths, does not allow backslash in it and is case sensitive.

Upvotes: 1

Views: 147

Answers (1)

Naftali
Naftali

Reputation: 146310

Instead of using includes, perhaps make an autoloader that uses all of your rules.

Then you can control how the files are included.

Upvotes: 2

Related Questions