Created
January 7, 2011 14:20
-
-
Save hiromi2424/769498 to your computer and use it in GitHub Desktop.
webroot controller
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class WebrootController extends AppController { | |
var $uses = null; | |
var $_ext = '.php'; | |
function show() { | |
$path = func_get_args(); | |
$path = implode(DS, $path); | |
if (in_array($path, array('index', 'css', 'test'))) { | |
$this->redirect(null, 404); | |
} | |
$this->render(null, null, WWW_ROOT . $path . $this->_ext); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment