よく似た他の回答を読んだことがありますが、私の問題は、テキストファイルが作成されても空のままであることです。
エラーメッセージは表示されません。同じコードが Windows サーバーで完全に機能します。
パーミッションは問題ありません: "apache" user CREATE the text file but ...
誰でも私を助けることができますか?
サーバー Apache 2.2
Red Hat 6
PHP 5
ほかに何か?
わかりました、コード
$oggi=date("Y").date("m").date("d").date("H").date("i").date("s");
$file = "Business_Case_".$oggi.".xml";
$f_handle = fopen($file, 'w');
$sql = "select * from bc_inizio";
$res = mysql_query($sql, $conn);
while ($arrow = mysql_fetch_array($res, MYSQL_ASSOC)) {
$friga = hex2bin($arrow['riga'])."\n";
fwrite($f_handle, $friga);
}
fclose($f_handle);
「mysql_affected_rows」は、正しく 1178 行が選択されて返されます!!