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 ÖÐÇÉÓÃÊý×é½µµÍ³ÌÐòµÄʱ¼ä¸´ÔÓ¶È
Íõ µ¤µ¤, ¸ß¼¶Èí¼þ¹¤³Ìʦ, IBM
2009 Äê 11 ÔÂ 26 ÈÕ
±¾ÎÄÖ÷ÒªÊǽéÉÜÔÚ PHP µÄ±à³ÌÖУ¬ÈçºÎÇÉÓÃÊý×éÀ´½µµÍÒò¶à²ãÑ»·¶øÒýÆðµÄʱ¼ä¸´ÔӶȵÄÎÊÌâ¡£ÌرðÊǵ±³ÌÐòÐèÒª¶à´ÎÓëÊý¾Ý¿â½»»¥Ê±£¬Óô˷½·¨À´ÓÅ»¯ÄãµÄ´úÂ룬½«»á´ø¸øÒâÏë²»µ½µÄЧ¹û¡£
ͨ³£¿ª·¢ÈËÔ±ÔÚд³ÌÐòµÄʱºò£¬ÍùÍùÊÇ°ÑÒѾÉè ......
SQL²éѯ»º´æ
Êʺ϶ÁÕß
±¾½Ì³ÌÊʺÏÓÚÄÇЩ¶Ô»º´æSQL²éѯÒÔ¼õÉÙÊý¾Ý¿âÁ¬½ÓÓëÖ´ÐеĸºÔØ¡¢Ìá¸ß½Å±¾ÐÔÄܸÐÐËȤµÄPHP³ÌÐòÔ±¡£
¸ÅÊö
Ðí¶àÕ¾µãʹÓÃÊý¾Ý¿â×÷ΪվµãÊý¾Ý´æ´¢µÄÈÝÆ÷¡£Êý¾Ý¿â°üº¬Á˲úÆ÷ÐÅÏ¢¡¢Ä¿Â¼½á¹¹¡¢ÎÄÕ»òÕßÁôÑÔ±¾£¬ÓÐЩÊý¾ÝºÜ¿ÉÄÜÊÇÍêÈ«¾²Ì¬µÄ£¬ÕâЩ½«»á´ÓÒ»¸ö»º´æϵͳÖеõ½µÄ¼«´óºÃ´¦¡£
ÕâÑùÒ»¸öϵͳͨ¹ý°ÑS ......
ÎãÓ¹ÖÃÒÉ£¬PHPÊÇÒ»Öַdz£°ôµÄ¶¯Ì¬ÍøÒ³ÖÆ×÷ÓïÑÔ£¬ËûºÍCµÄ¼«¸ßÏàËÆÐÔ£¬Ê¹µÃËüµÄÓ﷨ѧÆðÀ´
ºÜÈÝÒ×£¬ËûÓкܶàÀàËÆCÓïÑԿ⺯ÊýµÄ¶«Î÷£¬»¹ÓÐÏñÈÕÆÚ£¬×Ö·û´®ºÍʱ¼äº¯ÊýµÈ£¬ÕâʹµÃËüºÜÈÝ
Ò׿ª·¢Ï൱¸´ÔÓµÄÓ¦ÓóÌÐò¡£
µ±PHPÓ¦Óõ½¹Ø¼üwebÕ¾µãÉÏ£¬ÈçºÎ±£Ö¤ÖÊÁ¿½«»á±äµÃºÜ¹Ø¼ü¡£È»¶ø£¬PHP²¢²»ÊÇÒ» ......
ÏÈÎÒÃÇÁ˽âÒ»ÏÂÎÒÃǵÄphp³ÌÐòÊÇÔõÑùÖ´Ðеģ¬Ê×ÏÈËû±»±àÒëΪÖмä´úÂ룬ȻºóÖмä´úÂë±»ËÍÈëÖ´ÐÐÒýÇæÖ´ÐУ¬È»ºóÏú»Ù¡£Ã¿¸öÇëÇóµÄÖмä´úÂëÔÚÖ´ÐÐÍêÖ®ºó±»Ïú»Ù£¬ÕâÑùµÄºÃ´¦ÔÚÓÚËûÍêÈ«¸ôÀëÁ˲»Í¬µÄÇëÇó£¬Ê¹ÄÚ´æʹÓÃÂʽµµÍ¡£µ«ÊÇÕâÑùµÄȱµãÒ²ÏÔ¶øÒ×¼û£¬ÒòΪËûÐèÒªÔÙÖظ´ÇëÇóÒ»¸ö½çÃæµÄʱºò¶ÔÒ»¸ö´úÂëÁ¬Ðø±àÒëÁ½´Î£¬±àÒëµÄÖмä´úÂëà ......