前提・実現したいこと
お世話になります。
以前、PHP 5.3.3 で動いていたコードが PHP 7.2 にしたら下記メッセージがでるようになってしまいました。eachは非推奨になったとの事ですが・・・
発生している問題・エラーメッセージ
Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /省略/public_html/results.php on line 193
Warning: Variable passed to each() is not an array or object in /省略/public_html/results.php on line 193
該当のソースコード
<?php $filebody = "the $HTTP_POST_VARS array contains "; $filebody .= date("Y/m/d/(D) H:i:s"); $filebody .= "\r\n"; while(list($key,$var) = each($HTTP_POST_VARS)) { $filebody .= "$key , $var"; $filebody .= "\r\n"; } $filebody .= "\r\n"; $fp = fopen("../cgiData/temp.dat","a");回答2件
あなたの回答
tips
プレビュー