kostanza Posted June 11, 2013 Share Posted June 11, 2013 Hello, thank you for taking the time to look at my problem. I am getting this error. The php won't work. function mime_content_type($f){$f = escapeshellarg($f);return trim( `file -bi $f` );} It's saying that only the "}" on the last line is the source of the error. Any help as to why would be appreciated. Link to comment https://forums.phpfreaks.com/topic/279031-fatal-error-cannot-redeclare-mime_content_type/ Share on other sites More sharing options...
PravinS Posted June 11, 2013 Share Posted June 11, 2013 replace tilt(`) character with quote (") in the line return trim( "file -bi $f" ); Link to comment https://forums.phpfreaks.com/topic/279031-fatal-error-cannot-redeclare-mime_content_type/#findComment-1435307 Share on other sites More sharing options...
mac_gyver Posted June 11, 2013 Share Posted June 11, 2013 your function name is the same as a php built in function. use a different name for your function. @PravinS, the back-tick syntax in php is used for executing an operating system shell command. Link to comment https://forums.phpfreaks.com/topic/279031-fatal-error-cannot-redeclare-mime_content_type/#findComment-1435315 Share on other sites More sharing options...
kostanza Posted June 12, 2013 Author Share Posted June 12, 2013 Thank you for the replys! I tryed changing the ' to " but that didnt work, also, im not very good at PHP, what should I change the function name to? I searched php.net for functions but not sure what to do. Thank you again for all your help! Link to comment https://forums.phpfreaks.com/topic/279031-fatal-error-cannot-redeclare-mime_content_type/#findComment-1435477 Share on other sites More sharing options...
trq Posted June 12, 2013 Share Posted June 12, 2013 I tryed changing the ' to " but that didnt work Did you read the last reply? what should I change the function name to? Oh... you did. Change it to whatever you like. Link to comment https://forums.phpfreaks.com/topic/279031-fatal-error-cannot-redeclare-mime_content_type/#findComment-1435490 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.