I have a problem in my code. Whenever I instantiate COM its shows me this error: Fatal error: Class 'COM' not found in /Applications/XAMPP/xamppfiles/htdocs.

COM works if I use windows, but when i use mac, it gives me error. I dunno if there should be extensions I should uncomment in php.ini.

Any help is appreciated.

Recommended Answers

All 2 Replies

Between Windows and Linux / Unix there is a great deference of slash – backslash … take a loot to that…

Thanks for the reply jkon but that was not the answer i was looking for.

you see this line of code works on windows:

<?php
$word = new COM("word.application") or die("Unable to instantiate Word");

?>

But if I use that when Im using mac, it just give me error. I dont believe there is an issue with slash-backslahes there.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.