当我请求此功能时
//Add the content to the database
function articleadd() {
mysql_query("INSERT INTO site_content (title,content,reference,author,userid,authorip,day,month,year,token) VALUES ('$title','$articlebody','$reference','$author','$userid','$ipaddress','$day','$month','$year','$token')");
}
由于某些未知原因,它会产生内部服务器错误。老实说,我不知道为什么,我在下面请求这个功能,它工作正常
//Add a message if the user is not logged in
function message() {
mysql_query("INSERT INTO messages (from,to,subject,content,type,ip) VALUES ('$userid','$userid','The content $title is pending completion.','A article was attempted to be saved, however when the we tried to saved it there was no-one logged in. As a result we saved the article but quarantined it so it will not show on the website. To correct this error, please click the link below, review the article and confirm it should display on the site. <a href=$url>$url</a>','$type','$ipaddress')");
}
两者我都一个接一个地要求他们如下
articleadd()
message()
我有,在不起作用的函数中,用一个非常简单的方法替换了所有 mysql 查询
echo "hello world";
然而我得到了错误。
我试过复制和粘贴东西,甚至是“功能”这个词,以确保我没有犯愚蠢的错误。不幸的是,我无法通过我的托管服务提供商访问服务器日志。最后我知道我没有传递变量,这是一个单独的问题,但基于一个没有变量的工作和“hello world”测试这不可能是问题。