php zend 相对路径问题

  1. <?php
  2. define ('P_S', PATH_SEPARATOR);
  3. define ('ROOT'"../");
  4. set_include_path(ROOT .P_S .'Zend' .P_S .ROOT.get_include_path());
  5. require_once ROOT.'Zend/Loader.php';
  6. Zend_Loader::loadClass('Zend_Db');
  7. Zend_Loader::loadClass('Zend_Config_Ini');
  8. Zend_Loader::loadClass('Zend_Page');
  9. $config = new Zend_Config_Ini('../inc/config.php''general');
  10. $db = Zend_Db::factory($config->db->adapter,$config->db->config->toArray());
  11. ?>
  12.         <?
  13.                     //查询
  14.                     $select=$db->select();
  15.                     $select->from("UserGroup","*");
  16.                     $action_log=$db->fetchAll($select);
  17.                     foreach ($action_log as $arr){
  18.         
  19.         ?>
  20.         <input type="checkbox" name="usergroup[]" id="usergroup[]" value="<?=$arr['lsh']?>"> <? echo $arr['Name'];?>
  21.         <?
  22.         }
  23.         ?> 

原文地址:https://www.cnblogs.com/fengju/p/6173927.html