RichardM wrote:In that case you need another host. DooPHP has a few minimum requirements and this would be one of them.
Richard
anything is posbale. i have read the source code of doophp.
and i find the problem, just add 2 lines can fix my question.
config/common.conf.php
<?php
//for iis //by eyes
$r=isset($_GET['r'])?$_GET['r']:'/';
$_SERVER['REQUEST_URI']="/doophp$r";
/*
* Common configuration that can be used throughout the application
* Please refer to DooConfig class in the API doc for a complete list of configurations
* Access via Singleton, eg. Doo::conf()->BASE_PATH;
*/
error_reporting(E_ALL);
date_default_timezone_set('PRC');
/**
* for benchmark purpose, call Doo::benchmark() for time used.
*/
//$config['START_TIME'] = microtime(true);
//framework use, must defined, user full absolute path and end with / eg. /var/www/project/
$config['SITE_PATH'] = realpath(dirname(__FILE__).'/../../').'/';
//$config['PROTECTED_FOLDER'] = 'protected/';
$config['BASE_PATH'] = realpath(dirname(__FILE__).'/../../').'/dooframework/';
//for production mode use 'prod'
$config['APP_MODE'] = 'dev';
//just add under 3 lines
$config['SITE_PATH']=str_replace('\\','/',$config['SITE_PATH']);
$config['BASE_PATH']=str_replace('\\','/',$config['BASE_PATH']);
$_SERVER['DOCUMENT_ROOT']=str_replace('\\','/',$_SERVER['DOCUMENT_ROOT']);//----------------- optional, if not defined, default settings are optimized for production mode ----------------
$config['SUBFOLDER'] = str_replace($_SERVER['DOCUMENT_ROOT'], '', str_replace('\\','/',$config['SITE_PATH']));
if(strpos($config['SUBFOLDER'], '/')!==0){
$config['SUBFOLDER'] = '/'.$config['SUBFOLDER'];
}
$config['APP_URL'] = 'http://'.$_SERVER['HTTP_HOST'].$config['SUBFOLDER'].'index.php';
$config['AUTOROUTE'] = true;
$config['DEBUG_ENABLED'] = TRUE;
//echo '<pre>';print_r($config);die;////////////////////eyes
//$config['TEMPLATE_COMPILE_ALWAYS'] = TRUE;
//register functions to be used with your template files
//$config['TEMPLATE_GLOBAL_TAGS'] = array('url', 'url2', 'time', 'isset', 'empty');
/**
* Path to store logs/profiles when using with the logger tool. This is needed for writing log files and using the log viewer tool
*/
//$config['LOG_PATH'] = '/var/logs/';
/**
* defined either Document or Route to be loaded/executed when requested page is not found
* A 404 route must be one of the routes defined in routes.conf.php (if autoroute on, make sure the controller and method exist)
* Error document must be more than 512 bytes as IE sees it as a normal 404 sent if < 512b
*/
//$config['ERROR_404_DOCUMENT'] = 'error.php';
//$config['ERROR_404_ROUTE'] = '/error';
/**
* Settings for memcache server connections, you don't have to set if using localhost only.
* host, port, persistent, weight
* $config['MEMCACHE'] = array(
* array('192.168.1.31', '11211', true, 40),
* array('192.168.1.23', '11211', true, 80)
* );
*/
/**
* you can include self defined config, retrieved via Doo::conf()->variable
* Use lower case for you own settings for future Compability with DooPHP
*/
//$config['pagesize'] = 10;
?>