PHPのバージョンが上がっていると指摘されまして
以下の内容でMAMPを使って投稿したのですが
投稿されません。
どなたかお願いいたします。
検索でかけてもどこがversionアップしたのかわからず
本を見てもわからずわからないのでよろしくお願いいたします。
バージョンを下げました。
すると簡易な掲示板ではうまく表示されました。
投稿もできました。
しかしこれは返信ボタンが出てくるだけで
ボタンを押しても
文字コードを変換してやっても投稿ができません
何が原因だかよくわかりません
$name = htmlspecialchars($name); //特殊文字のHTMLエントリへの変換
$email = htmlspecialchars($email);
$subject = htmlspecialchars($subject);
$comment = htmlspecialchars($comment);
$comment = nl2br($comment); //HTML改行文字の挿入
$comment = str_replace("\r", "", $comment); //文字列の置換
$comment = str_replace("\n", "", $comment);
//ログファイルの区切文字(",")と区別するために文字コード(,)に書き換える。
$name = str_replace(",", ",",$name);
$email = str_replace(",", "",$email);
$subject = str_replace(",", ",",$subject);
$comment = str_replace(",", ",",$comment);//従来と同じ。
//インラインリンクを実現(URLのみ)
$comment = inline_link($comment);//ユーザー定義関数を呼び出しています。
//記事番号をゲット
$message = file($data_file);
if(sizeof($message) < 1){
$new_code = 1;
} else {
list($ncode,$nress,$nname,$nemail,$nsubject,$ncomment,$npass,$nnow) = split( ",", $message[0]);
$new_code = $ncode + 1;
}
//配列要素を文字列により連結
$input_msg = implode(",", array($new_code,$ress,$name,$email,$subject,$comment,$pass,$now));
$fp = fopen($data_file, "w");
rewind($fp);
fputs($fp, "$input_msg\n");