社区
PHP
帖子详情
求php代码例子
林g
2009-05-20 11:16:04
谁能给我一个php代码ajax的例子,我现在想学习php,是web方面
请大家帮忙提供点示例
谢谢了!
...全文
139
7
打赏
收藏
求php代码例子
谁能给我一个php代码ajax的例子,我现在想学习php,是web方面 请大家帮忙提供点示例 谢谢了!
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
7 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
lzz0098
2009-05-22
打赏
举报
回复
http://download.csdn.net/source/1329125
这里有一些Ajax入门知识
yybjroam05
2009-05-21
打赏
举报
回复
http://hi.baidu.com/jroam/blog/item/0df478f4087778daf3d385c1.html 给个网址你可以参考一下!
晒月光的青蛙
2009-05-21
打赏
举报
回复
ls的代码可以,初学的话看书还快点
林g
2009-05-21
打赏
举报
回复
本人是初学php,发这贴是为了帮人找资料.
请大家多多发言
sun0298
2009-05-21
打赏
举报
回复
路过帮你踩踩
wang_quan_li
2009-05-20
打赏
举报
回复
ajaxreg.js代码如下:
var http_request=false;
function send_request(url){//初始化,指定处理函数,发送请求的函数
http_request=false;
//开始初始化XMLHttpRequest对象
if(window.XMLHttpRequest){//Mozilla浏览器
http_request=new XMLHttpRequest();
if(http_request.overrideMimeType){//设置MIME类别
http_request.overrideMimeType("text/xml");
}
}
else if(window.ActiveXObject){//IE浏览器
try{
http_request=new ActiveXObject("Msxml2.XMLHttp");
}catch(e){
try{
http_request=new ActiveXobject("Microsoft.XMLHttp");
}catch(e){}
}
}
if(!http_request){//异常,创建对象实例失败
window.alert("创建XMLHttp对象失败!");
return false;
}
http_request.onreadystatechange=processrequest;
//确定发送请求方式,URL,及是否同步执行下段代码
http_request.open("GET",url,true);
http_request.send(null);
}
//处理返回信息的函数
function processrequest(){
var mess
if(http_request.readyState==4){//判断对象状态
if(http_request.status==200){//信息已成功返回,开始处理信息
if(http_request.responseText=='exist')
mess="<font color=red>此用户名已经存在,请更换用户名!</font>";
else if(http_request.responseText=='ok')
mess="<font color=red>此用户名可以注册</font>";
else if(http_request.responseText=='right')
mess="<font color=red>旧密码正确</font>";
else if(http_request.responseText=='error')
mess="<font color=red>旧密码不正确</font>";
document.getElementById(reobj).innerHTML=mess;
}
else{//页面不正常
alert("您所请求的页面不正常!");
}
}
}
function usercheck(obj){
var f=document.reg;
var username=f.username.value;
if(username==""){
document.getElementById(obj).innerHTML=" <font color='#ff0000'>用户名不能为空!</font>";
//f.username.focus();
//return false;
}
else if(username.replace(/[^\x00-\xff]/g,'##').length>16){
document.getElementById(obj).innerHTML=" <font color=red>用户名长度不能大于16位(汉字不能超过8个)!</font>";
//f.userpwd.focus();
return false;
}
else{
document.getElementById(obj).innerHTML="正在读取数据...";
send_request('checkuserreg.php?username='+username);
reobj=obj;
}
}
function userpwdcheck(obj){
var f=document.reg;
var oldpassword=f.oldpassword.value;
if(oldpassword==""){
document.getElementById(obj).innerHTML=" <font color='#ff0000'>旧密码不能为空!</font>";
//f.username.focus();
//return false;
}
else{
document.getElementById(obj).innerHTML="正在读取数据...";
send_request('checkuserpwd.php?oldpassword='+oldpassword);
reobj=obj;
}
}
function pwdcheck(obj){
var f=document.reg;
var pwd=f.userpwd.value;
if(pwd==""){
document.getElementById(obj).innerHTML=" <font color=red>用户密码不能为空!</font>";
//f.userpwd.focus();
return false;
}
else if(f.userpwd.value.length<6){
document.getElementById(obj).innerHTML=" <font color=red>密码长度不能小于6位!</font>";
//f.userpwd.focus();
return false;
}
else{
document.getElementById(obj).innerHTML=" <font color=red>密码符合要求!</font>";
}
}
function pwdrecheck(obj){
var f=document.reg;
var repwd=f.reuserpwd.value;
if (repwd==""){
document.getElementById(obj).innerHTML=" <font color=red>请再输入一次密码!</font>";
//f.reuserpwd.focus();
return false;
}
else if(f.userpwd.value!=f.reuserpwd.value){
document.getElementById(obj).innerHTML=" <font color=red>两次输入的密码不一致!</font>";
//f.reuserpwd.focus();
return false;
}
else{
document.getElementById(obj).innerHTML=" <font color=red>密码输入正确!</font>";
}
}
wang_quan_li
2009-05-20
打赏
举报
回复
<?
session_start();
$myCxmis = new Cxmis;
if($mysubmit =="确定"){
$result = $myCxmis->register($username,$password);
if($result==2){
$uid=$username;
session_register('uid');
?>
<script language="javascript">
alert("注册成功");
window.location='ywsljj.php';
</script>
<?
}else if($result==1){
?>
<script language="javascript">
alert("此用户名已经存在,请重新注册");
window.location='javascript:history.back(-1)';
</script>
<?
}else{
?>
<script language="javascript">
alert("注册失败,请重新注册");
window.location='javascript:history.back(-1)';
</script>
<?
}}else {
?>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
</head>
<script language="Javascript" src="/script/checkpassword.js"></script>
<script language="Javascript" src="/script/ajaxreg.js"></script>
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0">
<div align="left">
<table border="0" width="100%" cellspacing="0" cellpadding="0" id="table1">
<?
require("./include/top.inc");
?>
<tr>
<td align="left" valign="top">
<table border="0" width="100%" id="table3" cellspacing="0" cellpadding="0">
<tr>
<td align="left" valign="top" width="235">
<table border="0" width="100%" id="table19" cellspacing="0" cellpadding="0">
<tr>
<td align="left" valign="top">
</td>
</tr>
<tr>
<td>
<img border="0" src="images/zjcx_ml_11_01.gif" width="235" height="166"></td>
</tr>
</table>
</td>
<td align="left" valign="top">
<table border="0" width="100%" id="table14" cellspacing="0" cellpadding="0">
<tr>
<td width="22">
<img border="0" src="images/zjcx_07_01.gif" width="22" height="16"></td>
<td background="images/zjcx_07_02.gif">
<img border="0" src="images/zjcx_07_02.gif" width="745" height="16"></td>
</tr>
<tr>
<td background="images/zjcx_07_03.gif" height="380" width="22">
<img border="0" src="images/zjcx_07_03.gif" width="22" height="50"></td>
<td align="left" valign="top">
<table border="0" width="100%" id="table15" cellspacing="0" cellpadding="0">
<tr>
<td>
<p align="center">帐 号 注 册
<!--img border="0" src="images/zjcx_07_04_01.gif" width="745" height="35"--></td>
</tr>
<tr>
<td>
<table border="0" width="100%" id="table16" cellspacing="0" cellpadding="0">
<tr>
<td width="363">
<img border="0" src="images/zjcx_07_08_01.gif" width="363" height="17"></td>
<td background="images/zjcx_07_08_02.gif">
<img border="0" src="images/zjcx_07_08_02.gif" width="9" height="17"></td>
<td width="373">
<img border="0" src="images/zjcx_07_08_03.gif" width="373" height="17"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center">
<table border="0" width="98%" id="table18" cellspacing="0" cellpadding="0">
<tr>
<td>
<form name=reg method=post action="/register.php" onsubmit="return checkpwd(this)">
<table border="0" cellspacing="1" cellpadding="5" bgcolor="#9ad0eb">
<table border="0" cellspacing="1" cellpadding="5" bgcolor="#9ad0eb" width="100%">
<tr bgcolor="#e4f2fa"> <td colspan=3>帐号注册</td></tr>
( * 为必填项)
<tr bgcolor="#e4f2fa">
<td >
<div align="center">用户名<font color="#FF0000">*</font></div>
</td>
<td >
<input type="text" name="username" id="username" size="25" maxlength="15" onBlur="return usercheck('check')">
</td>
<td align="left" bgcolor="#FFFFFF"><!--input type=button value='检查用户名' onclick="return usercheck('check')"--><span id="check"> 3-16个字符,英文小写、汉字、数字、最好不要全部是数字。</span></td>
</tr>
<tr bgcolor="#e4f2fa">
<td >
<div align="center">密码<font color="#FF0000">*</font></div>
</td>
<td >
<input type="password" name="password" id="userpwd" onBlur="pwdcheck('pwd')">
</td>
<td align="left" bgcolor="#FFFFFF" id="pwd"> 密码字母有大小写之分。6-16位(包括6、16),限用英文、数字。</td>
</tr>
<tr bgcolor="#e4f2fa">
<td >
<div align="center">确认密码<font color="#FF0000">*</font></div>
</td>
<td >
<input type="password" name="checkpassword" id="reuserpwd" onBlur="pwdrecheck('repwd')">
</td>
<td align="left" bgcolor="#FFFFFF" id="repwd"> 请再次输入登录密码。</td>
</tr>
<tr bgcolor="#e4f2fa"><td colspan=3 align="center">
<input type="submit" name=mysubmit value="确定">
<input type=reset value="重填">
</td></tr>
</table>
</form>
<!--文字内容结束--></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table border="0" width="100%" id="table17" cellspacing="0" cellpadding="0">
<tr>
<td width="363">
<img border="0" src="images/zjcx_07_08_01.gif" width="363" height="17"></td>
<td background="images/zjcx_07_08_02.gif">
<img border="0" src="images/zjcx_07_08_02.gif" width="9" height="17"></td>
<td width="373">
<img border="0" src="images/zjcx_07_08_03.gif" width="373" height="17"></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<?
require("./include/bottom.inc");
?>
</table>
</div>
</body>
</html>
<?
}
$myCxmis->Destroy();
?>
10分钟搞定
php
+微信小程序支付 在线视频教程(含源
代码
)
10分钟搞定
php
+微信小程序支付 在线视频教程(含源
代码
) 01-微信小程序支付演示和
代码
说明 02-微信小程序获取openid服务器端
代码
说明 03-小程序支付后端
代码
说明和设置
【
PHP
代码
注入】
PHP
语言常见可注入函数以及
PHP
代码
注入漏洞的利用实例
目录1
PHP
注入概述2 相关函数与语言结构...
PHP
代码
执行:在WEB中,
PHP
代码
执行是指应用程序过滤不严,用户可用通过请
求
将
代码
注入到应用中执行。
PHP
代码
注入与SQL注入比较: 其注入思想是类似的,均是构造语句绕过服务
30个
php
操作redis常用方法
代码
例子
查个东西搜半天,下面整理一下
php
处理redis的
例子
,个人觉得常用一些
例子
。下面的
例子
都是基于
php
-redis这个扩展的。 1,connect 描述:实例连接到一个Redis. 参数:host: string,port: int 返回值:BOOL 成功...
php
中如何嵌入html
代码
,如何在
php
中嵌入html
代码
如何在
php
中嵌入html
代码
发布时间:2020-07-10 09:52:13来源:亿速云阅读:128作者:Leah这篇文章运用简单易懂的
例子
给大家介绍如何在
php
中嵌入html
代码
,
代码
非常详细,感兴趣的小伙伴们可以参考借鉴,希望对大家能...
PHP
代码
审计基础知识
本文章主要是
PHP
代码
审计的一些基础知识,包括函数的用法,漏洞点,偏向基础部分,个人能力有限,部分可能会出现错误或者遗漏,读者可自行补充。
代码
执行#
代码
执行是
代码
审计当中较为严重的漏洞,主要是一些命令...
PHP
20,359
社区成员
19,658
社区内容
发帖
与我相关
我的任务
PHP
“超文本预处理器”,是在服务器端执行的脚本语言,尤其适用于Web开发并可嵌入HTML中。PHP语法利用了C、Java和Perl,该语言的主要目标是允许web开发人员快速编写动态网页。
复制链接
扫一扫
分享
社区描述
“超文本预处理器”,是在服务器端执行的脚本语言,尤其适用于Web开发并可嵌入HTML中。PHP语法利用了C、Java和Perl,该语言的主要目标是允许web开发人员快速编写动态网页。
php
phpstorm
技术论坛(原bbs)
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章