Question

have problem on use php mimetype detection. think that is related to debian config files command :

file --mime doc.html

return : doc.html: text/x-c++; charset=utf-8

doc.html file: http://dpaste.com/hold/1709425/ also tried this

<?php echo mime_content_type('doc.html') ;?>

that return: text/x-c++ but when use this command :

mimetype doc.html

return text/html. this problem cause on using ojs when upload html files detect it as text/x-c++ and name it as untitled instead of html i read all ojs FAQ about this problem and try them with no success http://pkp.sfu.ca/wiki/index.php/PKP_Frequently_Asked_Questions#HTML_Galleys_don.27t_display_properly_.2F_files_I_upload_aren.27t_being_identified_properly.

Was it helpful?

Solution

I found solution, that related to special character inside html codes. when i use this site: http://infohound.net/tidy/ to make html code clean, OJS detect html code and command: file --mime doc.html detect file and html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top