Index: trunk/phase3/maintenance/dev/router.php |
— | — | @@ -1,5 +1,8 @@ |
2 | 2 | <?php |
3 | 3 | |
| 4 | +ini_set('display_errors', 1); |
| 5 | +error_reporting(E_ALL); |
| 6 | + |
4 | 7 | if ( isset( $_SERVER["SCRIPT_FILENAME"] ) ) { |
5 | 8 | $file = $_SERVER["SCRIPT_FILENAME"]; |
6 | 9 | if ( !is_readable( $file ) ) { |
— | — | @@ -7,9 +10,13 @@ |
8 | 11 | return false; |
9 | 12 | } |
10 | 13 | $ext = pathinfo( $file, PATHINFO_EXTENSION ); |
11 | | - if ( $ext == 'php' ) { |
12 | | - # Let it execute php files |
13 | | - return false; |
| 14 | + if ( $ext == 'php' || $ext == 'php5' ) { |
| 15 | + # Execute php files |
| 16 | + # We use require and return true here because when you return false |
| 17 | + # the php webserver will discard post data and things like login |
| 18 | + # will not function in the dev environment. |
| 19 | + require $file; |
| 20 | + return true; |
14 | 21 | } |
15 | 22 | $mime = false; |
16 | 23 | $lines = explode( "\n", file_get_contents( "includes/mime.types" ) ); |