This page contains the following errors:
error on line 3 at column 1: Extra content at the end of the document
Below is a rendering of the page up to the first error.
<?php
header( 'Content-type: text/xml' );
mysql_connect( "mysql3.000webhost.com", "Username", "Password" );
mysql_select_db( 'Ddb' );
mysql_query( "INSERT INTO items VALUES ( null, null, '".
mysql_real_escape_string( $_REQUEST['user'] ).
"', '".
mysql_real_escape_string( $_REQUEST['message'] ).
"')" );
?>
<success/>
<html>
<head>
<title>Add Definition Form</title>
</head>
<body>
<form action="add.php" method="POST">
User: <input name="user" /><br />
Message: <input name="message" /><br />
<input type="submit" />
</form>
</body>
</html>
所有文件上的教程我正在关注http://www.ibm.com/developerworks/library/x-ioschat/index.html#l3ioschat/index.html#l3
答案 0 :(得分:1)
完全遵循IBM文档中提到的那一点。我已在http://nixblog.webatu.com/test.html上传了一个测试页,但它确实有效。
所以不确定你做错了什么。
根据示例,数据库表插入用于表'chatitems',您似乎正在使用'items'。只需确保您插入的内容是正确的,并且它不会显示任何数据库错误。要做的是将'Content-type:text / xml'更改为'Content-type:text'