//方法二
$content = file_get_contents('test.txt');
//方法二
$content = file_get_contents('test.txt');
include('global.php');
if($_post['sub']){
$user = $_post['username'];
$pwd = md5($_post['password1'].$user);
$email = $_post['email'];
$q = $mysql->query("insert into `hl`.`hl_member`(`id`,`username`,`password`,`email`)values (null,'$user','$pwd','$email');");
if($q){
setcookie('login',$user);
$prompt_msg->p('恭喜您,亲爱的会员,您已经注册成功!','index.php','现在去首页。','http://www.phprm.com','先去论坛逛逛!');
}else{
$prompt_msg->p('非常抱歉,系统发生故障!');
}
}
?>
post.php 读文件并显示日志内容的php程序。
page.html 显示日志文章的html文档。
style.css教程 页面显示效果的css代码。
add.php 添加blog文章的php程序。
config/auth.php 用户名和密码配置文件。
index.php blog首页程序。
edit.php 编辑blog文章的程序。
delete.php 删除blog文章的程序。
archives.php 归档显示blog文章的程序。
logout.php 退出登录的程序。
//获取文件的主要信息。
$file = "data.txt";
if(is_dir($file))
{
echo "文件 $file 是个目录";
echo "<br/>";
}
else
{
echo "文件 $file 不是目录";
echo "<br/>";
}
$arr_date = array(
'2004-06-01',
'2005-0x-10',
'12-12-12',
'2000-12-25 00:10:20',
'2007-12-05'
);
在程序开发中,错误处理这一块是非常重要的,今天本文章就来告诉他关于在php开发中,错误处理函数并且举例说明错误处理的重要性。
1、内置异常处理类。
php教程 ajax 实例与ajax 教程
1创建xmlhttprequest对象的网页特效程序。
2 发出异步请求的javascript程序。
3 处理服务器响应的javascript程序。
<html>
<head>
<title>ajax+php无刷新二级联动菜单的应用实例</title>
<script language="网页特效">
var xmlhttp = null;
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=gb2312" />
<title>类别目录树</title>
<script type="text/网页特效">
function showmenu(menuid)
{
if(menuid.style.display=="none"){
menuid.style.display="";
}
else{
menuid.style.display="none";
}
}
</script>
<style>
body{margin:0px;}
table tr td{font-size:12px}
</style>
</head>
<body>
<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
<html xmlns="http://www.phprm.com/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=gb2312" />
<title>php多文件上传代码</title>
</head>
conn.php文件
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<script >
var xmlhttp
function showhint(str)
{
if (str.length==0)
{
document.getelementbyid("txthint").innerhtml=""
return
}
xmlhttp=getxmlhttpobject()
if (xmlhttp==null)
{
alert ("browser does not support http request")
return
}
xmlhttp.onreadystatechange=statechanged
//###########################################################
//
// for questions and comments
// roland (alias -=: vlieg :=-)
// icq #78354631
// mail: vlieg@atoomnet.net
//
// nb: this script won't work on free hosting pages, because of the secure mode!
// nb: you must have registered your icq# at http://web.icq.com/sms/login/ in order for this script to work
//###########################################################