Php Slim with SolrClient


Php Slim with SolrClient



I am trying query on my solr server from php slim code but i have problem to use SolrClient. I download solr.so in my php.ini. When i run normal php code, it works correct, However when I run slim code with SolrClient class, it says "Class 'blablaSolrClient' not found". I know solr.so is module for pure php but I want to know if it is possible to run it with slim?
Thx in advance




1 Answer
1



You have two options to use the global namespace for the SolrClient class.


$client = new SolrClient($options);


use SolrClient;

$client = new SolrClient($options);





thanks man first solution works. You saved my day
– erdemhayir
Jul 4 at 12:22





Then can you please accept my answer?
– DanielO
Jul 4 at 19:33





soory man I didn't know that. I accepted your answer. Thanks again
– erdemhayir
2 days ago






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

How to add background colour in existing image using Swift?

Moria Casán

How to make file upload 'Required' in Contact Form 7?