PHP简易聊天室&调试问题
2015-12-05 15:11
696 查看
在进入login.php程序之后
<?php
error_reporting(E_ALL^E_NOTICE);
session_start(); //装载Session库,一定要放在首行
$user_name=$_POST["nick"];
//session_register("user_name"); //注册$user_name变量,注意没有$符号
$_SESSION['user_name']; ?>
<!--chat.php:My聊天室主页面----------------------->
<html>
<title>My聊天室</title>
<frameset rows="80%,*">
<frame src="chat_display.php" name="chat_display">
<frame src="speak.php" name="speak">
</frameset>
</html>
在调试过程中出现:Undefined index:user_name
在程序前面加上error_reporting(E_ALL^E_NOTICE);就可以避免错误啦
<?php
error_reporting(E_ALL^E_NOTICE);
session_start(); //装载Session库,一定要放在首行
$user_name=$_POST["nick"];
//session_register("user_name"); //注册$user_name变量,注意没有$符号
$_SESSION['user_name']; ?>
<!--chat.php:My聊天室主页面----------------------->
<html>
<title>My聊天室</title>
<frameset rows="80%,*">
<frame src="chat_display.php" name="chat_display">
<frame src="speak.php" name="speak">
</frameset>
</html>
在调试过程中出现:Undefined index:user_name
在程序前面加上error_reporting(E_ALL^E_NOTICE);就可以避免错误啦
相关文章推荐
- thinkphp 文字教程
- php 的定界符 <<<eof 的问题
- PHP filter_input() 函数
- ubuntu下安装vftp 安装vsftpd提示530 Login incorrect
- 10亿次的比较--PHP”与“运算和”模“运算效率比较
- php7 一键安装
- ubuntu matplotlib的安装
- thinkphp 不支持 PATHINFO模式伪静态的解决办法
- phpstorm配置svn
- 在PHP中应用AJAX技术实现博客文章类别添加
- php 多文件上传
- PHP中的排序函数sort、asort、rsort、krsort、ksort区别分析
- php文件上传参数细节
- 在PHP中应用AJAX技术检测用户名是否重复
- 开发笔记 - PHP返回的数据问题
- RedHat7上安装PHP
- thinkphp 网页传参
- PHP 7 来了,PHP 6 去哪儿了?
- PHP 导出CSV
- PHP - mysql使用参数数据