[英]PHP can't find class 'GhostMailer'
So i am trying to call some functions of a mailer class.. In phpStorm when i type GhostMailer::setSender();
因此,我试图调用邮件程序类的某些功能。在phpStorm中,当我键入
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.. 当我单击
GhostMailer::
上的滚动按钮到GhostMailer::
所在的位置时,可以导航到该文件,但是每当我运行该程序时,它都会显示未找到GhostMailer类。
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 在
composer.json
的classmap
数组中添加"app/classes"
,然后运行composer dump-autoload
,您应该一切顺利
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.