I copied an SMS sending application from Alibaba Dayu from the server. There is no problem when I use it alone on the server, but when I run it locally, an error is reported. I don’t know where the problem is
The error message is as follows:
<code>Fatal error: Class 'TopClient' not found in /Applications/XAMPP/****/dayu.php on line 9 </code>
The server is the phpstudy construction environment of windows sever2003
The local XAPP is built on MAC computer with one click
I copied an SMS sending application from Alibaba Dayu from the server. There is no problem when I use it alone on the server, but when I run it locally, an error is reported. I don’t know where the problem is
The error message is as follows:
<code>Fatal error: Class 'TopClient' not found in /Applications/XAMPP/****/dayu.php on line 9 </code>
The server is the phpstudy construction environment of windows sever2003
The local XAPP is built on MAC computer with one click
Brother. The path is wrong.
Look carefully.
<code>/Applications/XAMPP/****/dayu.php</code>
That’s it. You should develop on mac. Introduction: You need to change the path of this file to ./*/dayu.php
Windows system does not have such a path as /App.... So use relative paths
The operating environment may be different. Your local Mac is Unix and the server is running Windows. The path may be read differently
It may be that the server environment is different from the local environment. I guess it may be because when you pull the project in git or svn, you have pulled some files because you set the ignore file setting
The error is obvious, the TopClient
called does not exist! It means that the copy you copied from the server is incomplete
It may be a case problem, file name, or class name. Because Windows is not strictly case-sensitive, the problem will not be exposed, while Unix systems are strictly case-sensitive.
See if there is a file import problem. The error is obvious.
It should be a path problem
I remember hearing this saying, the error itself is the cause of the error. I still use it today
Are you sure that other scripts that your script depends on have been included? ? ?