php zend 相对路径问题
程序员文章站
2023-04-07 16:10:02
<?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'];?>
<?
}
?>
上一篇: Ubuntu移除mysql后重新安装
下一篇: mysql建立外键