php µÄ ajax ʵÏÖ
<script type="text/javascript" src="jquery-1.3.2.min.js"></script>
<input type="button" onclick="test();" value="Ìá½»"/>
<script type="text/javascript">
function test(){
var valid = {
username: 'taoge',
password: '123456'
};
$.ajax({
url: 'valid.php',
type: 'get',
data: valid, // ·¢Ë͵ÄÊý¾Ý
dataType: 'json', // ·¢ËÍ/½ÓÊÕÊý¾ÝµÄ¸ñʽ
success: function(data){
alert(""+data.username);
},
error: function(data){
alert("xxx"+data);
}
});
}
</script>
===========================
valid.php
Ïà¹ØÎĵµ£º
JpgraphÏÂÔØÖ®ºó£¬°²×°·Ç³£¼òµ¥£¬½âѹµ½Ò»¸öÎļþ¼ÐÖУ¬ÀýÈ磺d:\Jpgraph£¬È»ºó´ò¿ªphpµÄ°²×°Ä¿Â¼£¬ÕÒµ½php.iniÎļþ£¬²¢ÐÞ¸ÄÆäÖеÄinlude_path²ÎÊý£¬²¢ÔÚÆäºó¼ÓÉÏJpgraphµÄ·¾¶£¬ÀýÈ磺inlude_path=".;d:\Jpgraph".
http://blog.csdn.net/zhuzhao/archive/2009/05/12/4174684.aspx ......
ϸ²ì PHP V5.3.0 ÌØÐÔ
¼¶±ð£º Öм¶
Stephen B. Morris, CTO, Omey Communications
2009 Äê 12 ÔÂ 07 ÈÕ
Ëæ×ÅÁ÷ÐÐµÄ PHP ÓïÑԵIJ»¶ÏÑݱ䣬ºÜ¶àÐÂÌØÐÔʹËüÔÚÃæÏò¶ÔÏó·½ÃæÓÐÁ˽øÒ»²½µÄÔöÇ¿¡£±¾ÎÄͨ¹ýһЩ PHP V5.3 ʵÀýÑÝʾÑÓ³Ù¾²Ì¬°ó¶¨¡¢Ãû³Æ¿Õ¼äÖ§³Ö¡¢Àà·½·¨ÖØÔØÒÔ¼°±äÁ¿½âÎöºÍ heredoc Ö§³Ö¡£
ÐèÇó
³ýÁË¶Ô PHP ºÍ H ......
ÊÊÓÃÓÚ×îеİ汾PHP-5.2.11ºÍAPACHE2.2
ÏÂÔصØÖ·
PHP£ºhttp://cn2.php.net/get/php-5.2.11-Win32.zip/from/a/mirror
PHPÖ±½ÓÏÂÔØhttp://cn.php.net/distributions/php-5.2.11-Win32.zip
APACHE http://labs.xiaonei.com/apache-mirror/httpd/httpd-2.2.14-win32-src.zip
1¡¢½«php½âѹµ½C:\phpĿ¼ÏÂ
2¡¢½«apache°²×° ......
checkcode.php
====================
<?php
session_start();
$funcs = array('imagecreatetruecolor','imagecolorallocate','imagefill','imageline','imagedestroy','imagecolorallocatealpha','imageellipse','imagepng');
if(!function_exists('ob_gzhandler'))
ob_clean();
//crea ......
Èç¹ûAJAX¼ÓÔصÄÊý¾ÝÊÇÒ»¸öHTMLƬ¶Î£¬¶øÇÒÕâ¸öHTMLƬ¶Î»¹°üº¬½Å±¾<script>¿é£¬ÄÇôÔÚÄã°ÑÕâÊý¾ÝxmlHttp.responseTextÓÃinnerHTML·½·¨²åÈëµ½µ±Ç°ÎĵµÒ»¸öÔªËØÖУ¬Äã»á·¢ÏÖAJAX¼ÓÔØ»ØÀ´µÄ½Å±¾¸ù±¾Ã»ÓÐÖ´ÐС£ÕâÊÇAJAX¿ª·¢Öкܳ£¼ûµÄÎÊÌ⣬Èç¹ûÄã²»ÊÇÒ»Ö±ÔÚÓÃJavaScript¿ò¼Ü×ö¿ª·¢£¬ÏàÐÅÄãÔç¾Í·¢ÏÖÕâ¸öÎÊÌâÁË¡£±¾ÎÄ·ÖÎöÁËÁ ......