PHP Classes


Recommend this page to a friend!

      PHP Search And Replace in File  >  All threads  >  error  >  (Un) Subscribe thread alerts  
Summary:mime_content_type not found
Date:2014-12-28 22:07:48

  1. error   Reply   Report abuse  
Picture of danidani danidani - 2014-12-28 22:07:48

Fatal error: Call to undefined function mime_content_type() in C:\xampp\htdocs\rplacestring\search_replace.php on line 236

Fatal error: Uncaught exception 'UnexpectedValueException' with message 'DirectoryIterator::__construct(C:\xampp\htdocs\rplacestring\doni.txt,C:\xampp\htdocs\rplacestring\doni.txt): The directory name is invalid. (code: 267)' in C:\xampp\htdocs\rplacestring\search_replace.php:250 Stack trace: #0 C:\xampp\htdocs\rplacestring\search_replace.php(250): DirectoryIterator->__construct('C:\xampp\htdocs...') #1 C:\xampp\htdocs\rplacestring\search_replace.php(454): search_replace->iterator() #2 C:\xampp\htdocs\rplacestring\demo.php(23): search_replace->get_results() #3 {main} thrown in C:\xampp\htdocs\rplacestring\search_replace.php on line 250

  2. Re: error   Reply   Report abuse  
Picture of Mike Jordan Mike Jordan - 2014-12-29 01:00:44 - In reply to message 1 from danidani
Check which version of PHP you are running. I am not sure which 5.x version they dropped the mime_content_type method, but you'll probably need to have the php_fileinfo extension enabled.