我終於解決了。抱歉發佈解決方案lat。下面,是我創建的文件上傳到服務器的功能:
require('functions/egnyte/lib/curl.php');
require('functions/egnyte/lib/curl_response.php');
require('functions/egnyte/EgnyteClient.php');
function doUpload() {
$domain = 'yourdomain';
$folder = '/Shared/our folder name/';
$oauthToken = 'your oauth token';
$fileBinaryContents = file_get_contents($_FILES['filedata']['tmp_name']);
$fileName = $_FILES['filedata']['name'];
// instantiate an Egnyte Client with the domain and oAuth token for the user with which the upload will be performed
$egnyte = new EgnyteClient($domain, $oauthToken);
// perform the upload and get the response from the server
$response = $egnyte->uploadFile($folder, $fileName, $fileBinaryContents);
}
請不要讓我知道的任何問題/問題ñ情況下,如果任何人的面孔。我可以幫忙。
FYI:
您也可以聯繫:
- 如何獲得OAuth令牌。
- 將您的egnyte帳戶的文件夾列入您網站的頁面。
查找cURL手冊頁中使用的參數,並與PHP手冊中cURL擴展的選項描述進行比較。 – CBroe 2014-11-02 17:10:03