Guest User

file_put_contents fails with stream wrapper

a guest
Jan 10th, 2012
61
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data