php zend 相对路径问题
(编辑:jimmy 日期: 2024/11/17 浏览:3 次 )
<?php
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){
?>
<input type="checkbox" name="usergroup[]" id="usergroup[]" value="<?=$arr['lsh']?>"> <? echo $arr['Name'];?>
<?
}
?>
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){
?>
<input type="checkbox" name="usergroup[]" id="usergroup[]" value="<?=$arr['lsh']?>"> <? echo $arr['Name'];?>
<?
}
?>
下一篇:Google PR查询接口checksum新算法第1/2页