ZF缓存类前端File配合XML的使用
程序员文章站
2022-05-14 09:18:21
...
学习练习 Zend Framework ?xml version="1.0" encoding="UTF-8"?ConfigMysqlhost127.0.0.1/hostuserroot/userpassword111/passworddbnametest/dbname/Mysql/Config ?phprequire_once("Zend/Loader.php");//载入缓存类与Config类的子类XMLZend_Loader::loadCla
学习练习 Zend Framework
127.0.0.1 root 111 test
'Zend_Cache_File.php','automatic_serialization' => true); //开启缓存(前端,后端,前端配置) $Cache = Zend_Cache::factory('File','File',$Foptions); //讲实例化的XML对象资源保存到缓存,并命名 $Cache -> save($XML,'config'); //载入缓存 $Result = $Cache -> load('config'); //----------调用XML-------------- echo "主机名是:" . $Result ->host . "
"; echo "用户名是:" . $Result ->user . "
"; echo "密码是:" . $Result ->password . "
"; echo "库名是:" . $Result ->dbname . "
"; ?>
上一篇: drupal 代码实现URL重写
下一篇: php使用GeoIP库实例_PHP