Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: pokeb/php-mvc-router
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: pjkix/php-mvc-router
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Able to merge. These branches can be automatically merged.
  • 1 commit
  • 4 files changed
  • 1 contributor

Commits on Mar 11, 2010

  1. Copy the full SHA
    d8e1f6d View commit details
Showing with 49 additions and 41 deletions.
  1. +21 −17 bootstrap.php
  2. +2 −1 config/config.default.php
  3. +23 −21 htdocs/_htaccess.default
  4. +3 −2 htdocs/index.php
38 changes: 21 additions & 17 deletions bootstrap.php
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
<?php
require_once('helpers/utility.php');
require_once('helpers/router.php');
require_once('config/config.php');
require_once('controllers/controller.php');
require_once('config/routes.php');



mb_internal_encoding('UTF-8');
mb_http_output('UTF-8');
mb_http_input('UTF-8');
mb_language('uni');
mb_regex_encoding('UTF-8');
ob_start('mb_output_handler');

session_start();
<?php
// set inc path
ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . dirname(__FILE__) );
chdir (dirname(__FILE__));

require_once('helpers/utility.php');
require_once('helpers/router.php');
require_once('config/config.php');
require_once('controllers/controller.php');
require_once('config/routes.php');



mb_internal_encoding('UTF-8');
mb_http_output('UTF-8');
mb_http_input('UTF-8');
mb_language('uni');
mb_regex_encoding('UTF-8');
ob_start('mb_output_handler');

session_start();
3 changes: 2 additions & 1 deletion config/config.default.php
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
<?php
<?php
// this is no longer needed
define("SITE_PATH","/path/to/site");
44 changes: 23 additions & 21 deletions htdocs/_htaccess.default
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
php_value include_path .:/usr/local/php/lib/php:/path/to/my/site
php_value auto_prepend_file bootstrap.php
php_value magic_quotes_gpc 0
php_value register_globals 0

Options +FollowSymlinks

RewriteEngine on

#any URL request that doesn't have an extension will be redirected to index.php
RewriteRule !\.[a-z]{2,7}$ index.php

ErrorDocument 404 /404.php

<Files ~ "\.htaccess">
Order allow,deny
Deny from all
</Files>

#hopefully you aren't still using SVN?!?! :)
RedirectMatch 404 \.svn/?$
# THIS IS NO LONGER NEEDED!

php_value include_path .:/usr/local/php/lib/php:/path/to/my/site
php_value auto_prepend_file bootstrap.php
php_value magic_quotes_gpc 0
php_value register_globals 0

Options +FollowSymlinks

RewriteEngine on

#any URL request that doesn't have an extension will be redirected to index.php
RewriteRule !\.[a-z]{2,7}$ index.php

ErrorDocument 404 /404.php

<Files ~ "\.htaccess">
Order allow,deny
Deny from all
</Files>

#hopefully you aren't still using SVN?!?! :)
RedirectMatch 404 \.svn/?$
5 changes: 3 additions & 2 deletions htdocs/index.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?php
router::route();
<?php
require_once '../bootstrap.php';
router::route();
exit;