Tuesday, 20 August 2013

How to Include or Autoload Class Files in Solarium for SOLR

How to Include or Autoload Class Files in Solarium for SOLR

I'm Trying to include or autoload Solarium for SOLR in PHP and I keep
getting errors. I know I'm doing it incorrectly but I'm new to
autoloading. I have the extension installed for php and that works. Here
is the error I receive:
Fatal error: Class 'Solarium\Client' not found in /Users/...
Here is my php file with code I'm testing—I realize that there is no
autoloading setup in my example, I'm new to autoloading confused at how to
use it:
<?php
require(__DIR__.'/init.php');
// check solarium version available
echo 'Solarium library version: ' . Solarium\Client::VERSION . ' - ';

No comments:

Post a Comment