ms word - How to read files which contain gap i filenames using 'antiword'? -
i using 'antiword' convert msword document text. have file name "care job house keeper catering job13806.doc" , antiword cannot read if passed in script.
public function convert($filenames) { return $content = shell_exec('antiword'." ".$filenames.' -');//dash @ end output content } if manually enter filename typing antiword , pressing tab after few charters of filename looks below , executes perfectly.
$ antiword care\ job\ housekeeper\ catering\ job13806.doc
use quotes:
shell_exec("antiword '$filename' -"); that'd produce:
antiword 'care job housekeeper catering job13806.doc' -
Comments
Post a Comment