2/18/2023 0 Comments Find word in file php![]() ![]() Like the PDF example above, you'll need to download another package. To read PDF files, you will need to install the XPDF package, which includes "pdftotext." Once you have XPDF/pdftotext installed, you run the following PHP statement to get the PDF text: $content = shell_exec('/usr/local/bin/pdftotext '.$filename.' -') //dash at the end to output content Reading DOC Files I was successful in the task, so let me show you how to read PDF and DOC files using PHP. My customer wanted their website's search engine (Sphider) to read these PDF files and DOC files so that their clients could get at the documents they needed without going through a bunch of summary pages to get them. It's core to their online services so it's not as though they're garbage files up on the server. One of my customers has an insane amount of PDF and Microsoft Word DOC files on their website. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |