Hello!Firstly I would like to appreciate people for creating such forums to help beginners to complete their work and to know the skills.
My question is like I am working on small job based portal.I uploaded resume(.doc) files into the database where its path is stored.While displaying the entire resume I hada problem of special characters and spaces in doc which is removed using COM
my code:
<?php
$fpath="../jobseekers/resumes/$ddr->resume";
$word = new COM(“word.application”) or die (“Could not initialise MS Word object.”);
$word->Documents->Open(realpath($fpath));
// Extract content.
$content =$word->ActiveDocument->Content;
$old_array=array(’[b]’,’[u]’,’[i]’,"’",);
$new_array=array(’
’,’
’,’
’,"-");
$string=str_replace($old_array,$new_array,$content);
echo “
”;
print_r($string);$word->ActiveDocument->Close(false);
$word->Quit();
$word = null;
unset($word);
?>
i had no problem for this as im using windows in my local system.Now when i uploaded the same into linux shared hosting I am getting error as follows:
Fatal error: Class ‘COM’ not found in /home/drknow/public_html/drknowledgematic.com
Please find appropriate solution.I am almost suffering since 4 days searching for this.I even came to know COM is not in linux.Pls help me solve this issue.
Thanks and Regards,
Dinesh ram.