0
//checks size of uploaded image on server side
if($_FILES['userfile']['size'] < $maxsize) {
//checks whether uploaded file is of image type
//if(strpos(mime_content_type($_FILES['userfile']['tmp_name']),"image")===0) {
$finfo=finfo_open(FILEINFO_MIME_TYPE);
if(strpos(finfo_file($finfo, $_FILES['userfile']['tmp_name']),"image")===0) {
// prepare the image for insertion
$imgData =addslashes (file_get_contents($_FILES['userfile']['tmp_name']));
// put the image in the db...
// database connection
mysql_connect($host, $user, $pass) OR DIE (mysql_error());
// select the db
mysql_select_db ($db) OR DIE ("Unable to select db".mysql_error());
私はすでに見つけてphp.iniの検索php_fileinfo.dll で変更しようとしているこの:致命的なエラー:未定義の関数finfo_open()の呼び出し
;extension=php_fileinfo.dll
削除します。正面からファイルを保存して閉じます。 Apache server.Butを再起動しても、$ finfo = finfo_open(FILEINFO_MIME_TYPE)という行に致命的なエラーが発生しています。私のPHPバージョンは5.6.8です。