I have problem with start Solarium Client
, I downloaded it by Composer
and GitHub
according the wiki tutorial, it's ok, but I don't know what I must do now.
When I tried this example code:
<?php
require(__DIR__.'/init.php');
htmlHeader();
// check solarium version available
echo 'Solarium library version: ' . Solarium\Client::VERSION . ' - ';
// create a client instance
$client = new Solarium\Client($config);
// create a ping query
$ping = $client->createPing();
// execute the ping query
try {
$result = $client->ping($ping);
echo 'Ping query successful';
echo '<br/><pre>';
var_dump($result->getData());
echo '</pre>';
} catch (Solarium\Exception $e) {
echo 'Ping query failed';
}
htmlFooter();
I have the following error:
Warning: require(C:\xampp\htdocs\solarium/init.php): failed to open stream: No such file or directory in C:\xampp\htdocs\solarium\test.php on line 3
Fatal error: require(): Failed opening required 'C:\xampp\htdocs\solarium/init.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\solarium\test.php on line 3
I use Xampp server.
Must I set some Path, where appropriate, how and where? File init.php
is in folder: C:\xampp\htdocs\solarium\vendor\solarium\solarium\examples\
and i start the demo file in folder: C:\xampp\htdocs\solarium\
Sorry for my English. Thank you for help.