質問

この関数を要求するとき

    //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」テストで動作することに基づいて、これは問題ではありません。

正しい解決策はありません

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top