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
相关文档:
jquery中已经封装了ajax的过程,使用起来很简单:
通过get方式提交:
<html>
<head>
<title>实现服务器时间实时变化</title>
<script language="javascript" type="text/javascript" src="js/jquery-1.3.1.js"></script>
& ......
1.
Download Apache for windows MSI
file, and run it
By
default, port is 80, root dir is %apache_dir%/htdocs. You can update the
settings in conf/httpd.conf file
2. If Apache Service can't be installed in "Control Panel > Admin Tools > Services&quo ......
开始之前,首先要澄清两个问题:第一,支持开源,不等于反对代码加密;第二,如果把不属于自己的东西(比如公司的)拿去开源,就更加不应该了。
以前知道的,PHP代码的加密都是用Zend的encoder,这东西不但是商业软件,好像还暴出过能够被破解的问题,所以就找到了替代的方案────php_screw,一个日本人开发的东东。
p ......
最近在Greg Beaver's的blog上发表的一篇新文章 comparing strings in PHP with the == operator 中提及了PHP的 == 运算符在对字符串进行比较时值得注意的问题。
在某些情况下,PHP会把类数值数据(如含有数字的字符串等)转换成数值处理,== 运算符就是其中之一。在使用 == 运算符对两个字符串进行松散比较时,PHP会把类数 ......