欢迎来到福编程网,本站提供各种互联网专业知识!

php zend 相对路径问题

发布时间:2009-01-12 作者: 来源:转载
php下使用zend相对路径的处理方法。
define ('P_S', PATH_SEPARATOR);
define ('ROOT', "../");
set_include_path(ROOT .P_S .'Zend' .P_S .ROOT.get_include_path());

require_once ROOT.'Zend/Loader.php';
Zend_Loader::loadClass('Zend_Db');
Zend_Loader::loadClass('Zend_Config_Ini');
Zend_Loader::loadClass('Zend_Page');
$config = new Zend_Config_Ini('../inc/config.php', 'general');
$db = Zend_Db::factory($config->db->adapter,$config->db->config->toArray());


?>

//查询
$select=$db->select();
$select->from("UserGroup","*");
$action_log=$db->fetchAll($select);
foreach ($action_log as $arr){

?>

}
?>

相关推荐