代码帖出来。肯定用到了header函数或者setcookie等之类的用法。
注意前面不能有输出,包括空格,空行。or:
ob_start();
//..............你的代码
ob_end_flush();
注意前面不能有输出,包括空格,空行。or:
ob_start();
//..............你的代码
ob_end_flush();
解决方案 »
- 邮件发送问题?
- 小三同志紧急呼叫,请高手大哥来下。。。
- 求助有类似经历的同志
- 如何不解压rar读取其中的文件?
- 请问php如何在windows server 2003 + iis6.0 上运行 ?
- 我的PHP不支持imap函数。请高手指点
- 再问:关于静态页面访问IP记数的问题!
- 请教一下,www.go2map.com 的寻找 最佳路线的算法如何实现的,给分
- 使用sleep函数解决定时删除未支付订单探讨
- 自己用ul li结合css,js做了一个漂亮的复选框,可是怎么把选择的值传给sql
- WebCMS网站内容管理平台软件,php开发。http://wb.josetech.com 欢迎试用!!!
- 各位一個關于mail function的問題.在線等候謝謝!
//index.php
<html>
<head>
<title></title>
</head><body >
<center>
<table width="778" border="0" cellspacing="0" cellpadding="0">
<tr>
<table width="92%" border="0" cellspacing="0" cellpadding="0" align="center" background="images/point_heng.gif" height="24">
<tr>
<td valign="middle">
<div align="center"><img src="images/title_login.gif" width="70" height="22" alt="登录"></div>
</td>
</tr>
</table>
<table width="92%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td background="images/point_shu.gif"><img src="images/point.gif" width="1" height="1"></td>
<td width="100%">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="aa">
<tr>
<td> </td>
</tr>
</table>
<?include("login.php"); ?>
.....
//login.php
<?
require "config.php";
function login($username,$passwd){
if($username){
$ip=$REMOTE_ADDR;
setcookie ("cookien",$username,time()*3600*24*365,"/");
setcookie ("cookiep",$passwd,time()*3600*24*365,"/");
echo"<table width='100%' border='0' cellspacing='0' cellpadding='0' class='aa'>
<tr><td align='center'>登陆成功!</td></tr>
<tr>
<td align='center'>欢迎您:$username</td>
</tr>
<tr>
<td align='center'>这是您第次访问我们网站</td>
</tr>
<tr>
<td align='center'>您上一次登陆时间为:</td>
</tr><tr><td> </td></tr>
<tr>
<td align='center'><a href=>注销我的登陆<a></td>
</tr>
</table>";
exit;
}
}
login($username,$passwd);
?>
<?
ob_start();
require "config.php";
function login($username,$passwd){
if($username){
$ip=$REMOTE_ADDR;
setcookie ("cookien",$username,time()*3600*24*365,"/");
setcookie ("cookiep",$passwd,time()*3600*24*365,"/");
echo"<table width='100%' border='0' cellspacing='0' cellpadding='0' class='aa'>
<tr><td align='center'>登陆成功!</td></tr>
<tr>
<td align='center'>欢迎您:$username</td>
</tr>
<tr>
<td align='center'>这是您第次访问我们网站</td>
</tr>
<tr>
<td align='center'>您上一次登陆时间为:</td>
</tr><tr><td> </td></tr>
<tr>
<td align='center'><a href=>注销我的登陆<a></td>
</tr>
</table>";
exit;
}
}
login($username,$passwd);
ob_end_flush();
?>
搁到index.php头一行