undefined-function

PHP fileinfo is undefined function

一个人想着一个人 提交于 2019-11-26 11:21:14
Whenever I try to get the mime content type from php, it echos: Fatal error: Class 'finfo' not found in /home/jobynadel/finadel.com/video/finfo.php on line 4 or Fatal error: Call to undefined function finfo_open in /home/jobynadel/finadel.com/video/finfo.php on line 4 I just can't figure it out! The code I am using is: $file_info = new finfo(FILEINFO_MIME_TYPE); // See constant value http://php.net/manual/en/fileinfo.constants.php#113687 $mime_type = $file_info->buffer(file_get_contents($file)); Have a look at your php.ini file and check that the fileinfo.so or php_fileinfo.dll is activated

PHP fileinfo is undefined function

匆匆过客 提交于 2019-11-26 03:30:22
问题 Whenever I try to get the mime content type from php, it echos: Fatal error: Class \'finfo\' not found in /home/jobynadel/finadel.com/video/finfo.php on line 4 or Fatal error: Call to undefined function finfo_open in /home/jobynadel/finadel.com/video/finfo.php on line 4 I just can\'t figure it out! The code I am using is: $file_info = new finfo(FILEINFO_MIME_TYPE); // See constant value http://php.net/manual/en/fileinfo.constants.php#113687 $mime_type = $file_info->buffer(file_get_contents(

Undefined function mysql_connect()

随声附和 提交于 2019-11-26 00:12:52
问题 I have ran aptitude install php5-mysql (and restarted MySQL/Apache 2), but I am still getting this error: Fatal error: Call to undefined function mysql_connect() in /home/validate.php on line 21 phpinfo() says the /etc/php5/apache2/conf.d/pdo_mysql.ini file has been parsed. 回答1: Well, this is your chance! It looks like PDO is ready; use that instead. Try checking to see if the PHP MySQL extension module is being loaded: <?php phpinfo(); ?> If it's not there, add the following to the php.ini