我正在嘗試使用zendframework/zend-soap庫在 PHP 中編寫一個 SOAP 服務器。這是我的目錄結構:|- app/ |- mySoapService.php|- composer.json|- composer.lock|- vendor/這是的內容composer.json:{ "name": "my_soap_service", "description": "This package is implementing a SOAP service.", "type": "project", "require": { "zendframework/zend-soap": "^2.8" }, "require-dev": { }}我在終端中輸入了以下命令:zeinab: ~/my_soap_server$ composer installPHP Warning: Module 'soap' already loaded in Unknown on line 0PHP Warning: Module 'soap' already loaded in Unknown on line 0Loading composer repositories with package informationUpdating dependencies (including require-dev)Package operations: 10 installs, 0 updates, 0 removals - Installing psr/container (1.0.0): Loading from cache - Installing container-interop/container-interop (1.2.0): Loading from cache - Installing zendframework/zend-stdlib (3.2.1): Loading from cache - Installing zendframework/zend-validator (2.12.2): Downloading (100%) - Installing zendframework/zend-escaper (2.6.1): Downloading (100%) - Installing zendframework/zend-uri (2.7.1): Downloading (100%) - Installing zendframework/zend-eventmanager (3.2.1): Loading from cache - Installing zendframework/zend-code (3.4.1): Downloading (100%) - Installing zendframework/zend-server (2.8.1): Downloading (100%) - Installing zendframework/zend-soap (2.8.0): Downloading (100%) zendframework/zend-validator suggests installing psr/http-message (psr/http-message, required when validating PSR-7 UploadedFileInterface instances via the Upload and UploadFile validators)
1 回答

婷婷同學_
TA貢獻1844條經驗 獲得超8個贊
您似乎忘記添加作曲家的自動加載功能。這對于告訴 PHP 在哪里可以找到您正在實例化的類是必要的。查看Composer 的文檔以獲取有關它的更多信息。
include __DIR__ . '/PATH/TO/VENDOR/FOLDER/autoload.php';
在文件開頭添加。
- 1 回答
- 0 關注
- 77 瀏覽
添加回答
舉報
0/150
提交
取消