So i am trying to call some functions of a mailer class.. In phpStorm when i type GhostMailer::setSender();
I can navigate to the file when i click my scroll button on the GhostMailer::
text to where GhostMailer is into, but whenever i run the program it says class GhostMailer not found..
Code for calling
GhostMailer::setSender(Input::get('emailfrom'));
GhostMailer::addRecipient(Input::get('emailto'));
GhostMailer::setSubject(Input::get('subject'));
GhostMailer::setHTML(true);
GhostMailer::setMessage(Input::get('email'));
GhostMailer::setReturnAddress(Input::get('emailfrom'));
GhostMailer::getHeaders();
GhostMailer::send();
How do i fix this?
This sounds to me like the class (file) is not actually loaded and therefore the class doesn't exist at runtime.
Add "app/classes"
, to the classmap
array in composer.json
and then run composer dump-autoload
and you should be good to go
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.