问题如下:Warning: Cannot add header information - headers already sent by (output started at D:\www\test_o.php:1) in D:\www\test_o.php on line 7
解决方案 »
- 问这段真正是什么意思 ?preg_match('#^([^:]+): (.*)\s+$#', $str, $match
- PHP给推广网站的用户奖励
- PHPer路要怎么走?
- 为什么function_exists 总返回faulse?
- 我错了,不应该去面试的
- 一串数字前面有0,0的个数不定,怎么去掉前面的0?
- 关于session的操作问题,请教大家
- 过虑部分字符(请唠叨大哥再来一下,谢谢)
- [^<] 表示不含字符“<” 那么不含字符串“abc”怎么表示呢?难道用[^(abc)]?
- 求助,bugfree使用查询条件出现警告,提示Invalid argument supplied for foreach() in
- 怎样在多处数据库连接时安全的从一个来源得到用户名和密码?
- 谁能给我一个最简单的翻页的代码?
exit;可以去掉exit;
$query="INSERT into sms_yy(id,content,length,author,sendtime,comments) values('$id', '$content', '$length', '$author', '$sendtime', '$comments')";不起作用
只要echo$query是否有值再作决定
putenv("ORACLE_SID=oracle");
putenv("NLS_LANG=american_taiwan.zht16big5");
$handle=ora_logon("system","tiger") or die;
$cursor=ora_open($handle);
ora_commitoff($handle);
$query="INSERT into sms_yy(id,content,author,comment) values('$id', '$content', '$author', '$comment' )";
ora_parse($cursor, $query) or die;
ora_exec($cursor);
ora_close($cursor);
ora_logoff($handle);
Header("Location: addmsg.php");
exit;} else {
?><html>
<head>
<title>成功写入</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head><body bgcolor="#FFFFFF" text="#000000">
<table width="80%" border="0" cellspacing="0" cellpadding="0" height="58">
<tr bgcolor="#0066FF" bordercolor="#FFFFFF">
<td width="21%" height="2">
<div align="center"><font color="#FFFFFF">短语代码</font></div>
</td>
<td width="25%" height="2">
<div align="center"><font color="#FFFFFF">内容</font></div>
</td>
<td width="27%" height="2">
<div align="center"><font color="#FFFFFF">短语作者</font></div>
</td>
<td width="27%" height="2">
<div align="center"><font color="#FFFFFF">备注</font></div>
</td>
</tr>
<tr>
<td height="15" width="21%">
<div align="center"><?="$id"?></div>
</td>
<td height="15" width="25%">
<div align="center"> <?="$content"?></div>
</td>
<td height="15" width="27%">
<div align="center"><?="$author"?></div>
</td>
<td height="15" width="27%">
<div align="center"><?="$comments"?></div>
</td>
</tr>
</table>
</body>
</html>
<?php
}
?>
错误如下:
Warning: Oracle: Connection Failed: ORA-12560: TNS:协议适配器错误 in D:\www\xxx\add.php on line 7