易截截图软件、单文件、免安装、纯绿色、仅160KB

php ajax debug method make log in a text file

log into file
//
ob_start();
echo "<pre>";
print_r($data);
echo "</pre>";
$a=ob_get_contents();
//DAL::remove("insert into mytest(vvv) values('$a')");
$filename = "file.txt";
$file = fopen($filename, "w"); //open file
fwrite($file, $a); //first line
fclose($file); //close
ob_end_clean();
//


相关文档:

php中smarty模版引擎中的缓存应用!

1,Smarty缓存的配置:
   $smarty->cache-dir="目录名";   //创建缓存目录名
   $smarty->caching=true;   //开启缓存,为false的时候缓存无效
   $smarty->cache_lifetime=60; //缓存时间,单位是秒
2,Smarty缓存的使用与清除
   $marty->d ......

php删除文件和整个文件夹

function delfile($dir)
{
if (is_dir($dir))
{
$dh=opendir($dir);
while (false !== ( $file = readdir ($dh)))
{
if($file!="." && $file!="..")
{
$fullpath=$dir."/".$file;
if(!is_dir($fullpath))
{
unlink($fullpath);
} ......

在Apache中支持PHP的配置参数

打开 httpd.conf 文件 加入以下配置
以php模块配置apache2.2.x 
#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL by hooyes
PHPIniDir "D:/php-5.2.6-Win32/"
LoadFile D:/php-5.2.6-Win32/php5ts.dll
LoadFile D:/php-5.2.6-Win32/li ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号