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
#--Config--#
$login_password= '123456'; //这是密码
#----------#
error_reporting(E_ALL);
set_time_limit(0);
ini_set("max_execution_time","0");
ini_set("memory_limit","9999M");
set_magic_quotes_runtime(0);
if(!isset($_SERVER))$_SERVER = &$HTTP_SERVER_VARS;
if(!isset($_POST))$_PO ......
此篇文章准备分2个部分来讲述:
第一部分主要详细讲述一下怎么构建一个完成的C++应用扩展模块;
第二部分主要讲述在PHP及Zend框架下怎么使用Zend API和C++语言来实现自己所要的功能以及项目的开发;
此篇文章所运用的环境在Linux
2.4.21-4.ELsmp(Red Ha ......
<?php
$link=mysql_connect("localhost","root","root");
$db=mysql_select_db("bustest",$link);
$sql1="select name from info group by name order by id asc";
print("<table border='1'>");
$res1=mysql_query($sql1);
while($row1=mysql_fetch_array($res1)){
$name=$row1["name"];
$sql2="select i ......
SQL查询缓存
适合读者
本教程适合于那些对缓存SQL查询以减少数据库连接与执行的负载、提高脚本性能感兴趣的PHP程序员。
概述
许多站点使用数据库作为站点数据存储的容器。数据库包含了产器信息、目录结构、文章或者留言本,有些数据很可能是完全静态的,这些将会从一个缓存系统中得到的极大好处。
这样一个系统通过把S ......
腾讯的QQ空间根据会员资料计算生日并提醒好友发送生日祝福,一些网站也有类似的功能,比如提前几天向会员发送祝福邮件。
大致过程如下:设置一个自动执行程序,比如Linux下可以用CronTab 实现。此程序每天执行一次读取会员资料中的birth_day,
判断是否符合设置的发送要求。假如设置提前三 ......