2

I have added custom class under /src/Common directory as described here I do everything as described in link but it doesn't work. I can't understand why. Thank you in advance for help.

Custom Class: HttpClient.class.php

namespace Common;

class HttpClient {...

Controller:

use Common\HttpClient;

$httpClient = new HttpClient();

Error:

FatalErrorException: Error: Class 'Common\HttpClient' not found in ...

1 Answer 1

2

Problem is my class exstension. It was .class.php and I changed it to .php and everything works now.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.