您好我正在嘗試在我的網站上使用tokbox視頻聊天API集成。您必須在運行演示文件中定義TOKBOX_API_KEY和TOKBOX_SECRET
我做了什麼:
我從tokbox php下載他們的項目。使用作曲家我安裝必需的存儲庫文件並創建供應商文件夾。現在根據他們的說明,我在run-demo文件中添加api-key和secret-key,並使用cmd編譯run-demo批處理文件。當我訪問他們的服務器鏈接http://localhost:8080/session
它的節目You must define an TOKBOX_API_KEY and TOKBOX_SECRET in the run-demo file
。
運行演示文件
#!/bin/sh
if [ -z "$TOKBOX_API_KEY" ] || [ -z "$TOKBOX_SECRET" ]
then
export TOKBOX_API_KEY=<MY_API_KEY>
export TOKBOX_SECRET=<MY_API_SECRET>
fi
if [ -d "storage" ]
then
rm -rf storage/
fi
php -S 0.0.0.0:8080 -t web web/index.php
和
:: Why? because windows can't do an OR within the conditional
IF NOT DEFINED TOKBOX_API_KEY GOTO defkeysecret
IF NOT DEFINED TOKBOX_SECRET GOTO defkeysecret
GOTO skipdef
:defkeysecret
SET TOKBOX_API_KEY=
SET TOKBOX_SECRET=
:skipdef
RD /q /s storage
php.exe -S localhost:8080 -t web web/index.php
我怎麼能解決這個問題?
是的,我做到了。當我打開該網址時,它顯示出錯。\ – Vivek
我添加了api-key和密鑰......但是它說「你必須在運行演示文件中定義一個TOKBOX_API_KEY和TOKBOX_SECRET' – Vivek