PHP 5.4如何在沒有作曲者的情況下在webspace上使用PHP庫?
這LIB與作曲家創建。但是我不能在我的網站上使用作曲家。
我對它進行了搜索,答案是包含自動加載器函數並將其註冊到spl_autoload_register。
我試過無法使用自動加載功能得到任何東西。
我不知道是否必須替換命名空間並使用腳本或用spl_autoload_register
或兩者替換它們。
namespace ApaiIO;
use ApaiIO\Configuration\ConfigurationInterface;
use ApaiIO\Operations\OperationInterface;
use ApaiIO\Request\RequestFactory;
use ApaiIO\ResponseTransformer\ResponseTransformerFactory;
有人可以解釋我(可能與源代碼)我需要做什麼才能讓庫運行?
(UPDATE)
dowloaded XAMPP &作曲
加入depency到composer.json
運行作曲家安裝 - > LIB中加入
已上傳t他整個供應商文件夾
- 想開始實施例11b的
- >錯誤:
You must set up the project dependencies, run the following commands:
curl -s http://getcomposer.org/installer | php php composer.phar install
問題: 我必須在文件夾供應商的autoload.php添加到任何腳本?
_but我不能在我的webspace._使用作曲家 - 爲什麼?有什麼問題? – Federkun
在上傳到共享主機之前,爲什麼不能在本地計算機上安裝軟件包? – Chris
只需上傳'/ vendor'文件夾以及您的主機,它應該工作? –