Guest User

file_put_contents fails with stream wrapper

a guest
Jan 10th, 2012
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.30 KB | None | 0 0
  1. include("HTTP/WebDAV/Client.php");
  2.  
  3. $remote = "webdavs://{$user}:{$pass}@{$host}/{$remotePath}";
  4.  
  5. $content = file_get_contents(realpath($local));
  6. if ($content !== FALSE) {
  7.     #$handler = fopen($remote, 'w');
  8.     #fwrite($handler, $content);
  9.     #fclose($handler);
  10.     file_put_contents($remote, $content);
  11. }
Add Comment
Please, Sign In to add comment