
2008-12-11 14:08 Thursday
记录一个,Smarty是很聪明的
ob_start();//开启缓冲区
$smarty->assign(“a”,$a);
$smarty->display(”temp.html”);
$html_content= ob_get_contents(); //读取缓冲区的数据
ob_end_clean();//关闭缓冲区
$htm_content里头的东西就是想要的东西了,将它写入页面就可以了。
标签: PHP
2008-10-5 9:08 Sunday
郁闷,我不会用phpMyAdmin自带的那个setup步骤配置,一直都是直接通过改config.ini.php来配置的
过程如下:
1.从phpMyAdmin/libraries/下拷贝config.default.php到phpMyAdmin下,并改名为config.ini.php
2.用editplus或其它编辑器打开phpMyAdmin/config.ini.php,修改:
$cfg['PmaAbsoluteUri'] = 'http://127.0.0.1/phpMyAdmin';//phpMyAdmin的安装路径
$cfg['blowfish_secret'] = 'hejone';//加密密匙,可随意更改。
$cfg['Servers'][$i]['host'] = 'localhost'; // MySQL的主机名称或者IP地址
$cfg['Servers'][$i]['port'] = '3306′; // MySQL端口 - 空白将用默认端口3306
$cfg['Servers'][$i]['auth_type'] = 'cookie'; // 认证方式 (config, http or cookie based)?
$cfg['Servers'][$i]['user'] = 'root'; // MySQL用户,如 root
$cfg['Servers'][$i]['password'] = 'pswd'; // MySQL用户密码
3:保存
搞定 !
标签: PHP