oskans Posted October 29, 2015 Share Posted October 29, 2015 Aşagıda kod ile upload yapıyorum fakat ismi dosya ısmı degil sebebi nedir acaba yardımcı olurmusunuz? <?php function yandexDiskUpload($user, $password, $file, $fileName = NULL, $folder =dosya) { $yandexWebDavUrl = $folder ? "https://webdav.yandex.com.tr/$folder/": "https://webdav.yandex.com.tr/"; $fileHandler = fopen($file['tmp_name'], 'r'); $fileDetails = explode('.', strtolower($file['name'])); $findExtension = end($fileDetails); if ( isset($fileName) ) $fileName = $fileName.'.'.$findExtension; else $fileName = uniqid().'.'.$findExtension; $ch = curl_init($yandexWebDavUrl . $fileName); curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY); curl_setopt($ch, CURLOPT_USERPWD, "$user:$password"); curl_setopt($ch, CURLOPT_PUT, TRUE); curl_setopt($ch, CURLOPT_INFILE, $fileHandler); $result = curl_exec($ch); fclose($fileHandler); Quote Link to comment Share on other sites More sharing options...
NotToday Posted October 29, 2015 Share Posted October 29, 2015 (edited) Bunu dener misin "https://webdav.yandex.com.tr/{$folder}/" Biraz daha bakındığımda meselenin söylediğimle alakası olmadığını anladım.Kuvvetle muhtemel hata tırnakdan kaynaklı. function yandexDiskUpload($user, $password, $file, $fileName = NULL, $folder ='dosya') Edited October 29, 2015 by NotToday Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.