php zend 相对路径问题

yipeiwu_com6年前PHP代码库
<?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'];?>
<?
}
?>

相关文章

PHP实现浏览器格式化显示XML的方法示例

PHP实现浏览器格式化显示XML的方法示例

本文实例讲述了PHP实现浏览器格式化显示XML的方法。分享给大家供大家参考,具体如下: 在头部加上 header("Content-type: application/xml");...

php为字符串前后添加指定数量字符的方法

本文实例讲述了php为字符串前后添加指定数量字符的方法。分享给大家供大家参考。具体分析如下: 这段php代码定义了两个函数 str_prefix和str_suffix,分别用来给字符串前...

php 获取本地IP代码

复制代码 代码如下:<?function get_client_ip(){if ($_SERVER['REMOTE_ADDR']) {$cip = $_SERVER['REMOTE...

simplehtmldom Doc api帮助文档

API Reference Helper functions object str_get_html ( string $content ) Creates a DOM object f...

PHP的autoload自动加载机制使用说明

在PHP开发过程中,如果希望从外部引入一个class,通常会使用include和require方法,去把定义这个class的文件包含进来,但是这样可能会使得在引用文件的新脚本中,存在大量...