php下使用zend相對路徑的處理方法。如何使用呢?就跟隨本站小編一起去了解下吧,想了解更多相關資訊請持續關注我們應屆畢業生考試網!
<?php
define ('P_S', PATH_SEPARATOR);
define ('ROOT', "../");
set_include_path(ROOT .P_S .'Zend' .P_S _include_path());
require_once ROOT.'Zend/';
Zend_Loader::loadClass('Zend_Db');
Zend_Loader::loadClass('Zend_Config_Ini');
Zend_Loader::loadClass('Zend_Page');
$config = new Zend_Config_Ini('../inc/', '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'];?>
<?
}
?>