Pages are now parsed by PHP first.
This commit is contained in:
parent
4cb2b24fae
commit
84d036d23e
1 changed files with 8 additions and 2 deletions
10
lib/pico.php
10
lib/pico.php
|
@ -47,10 +47,16 @@ class Pico {
|
|||
|
||||
$this->run_hooks('before_load_content', array(&$file));
|
||||
if(file_exists($file)){
|
||||
$content = file_get_contents($file);
|
||||
ob_start();
|
||||
include($file);
|
||||
$content = ob_get_contents();
|
||||
ob_end_clean();
|
||||
} else {
|
||||
$this->run_hooks('before_404_load_content', array(&$file));
|
||||
$content = file_get_contents($settings['content_dir'] .'404'. CONTENT_EXT);
|
||||
ob_start();
|
||||
include($settings['content_dir'] .'404'. CONTENT_EXT);
|
||||
$content = ob_get_contents();
|
||||
ob_end_clean();
|
||||
header($_SERVER['SERVER_PROTOCOL'].' 404 Not Found');
|
||||
$this->run_hooks('after_404_load_content', array(&$file, &$content));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue