Changeset 1971
- Timestamp:
- 4/28/2010 6:09:57 AM (3 years ago)
- File:
-
- 1 edited
-
trunk/website/scripts/BuildPublish.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/website/scripts/BuildPublish.php
r1970 r1971 49 49 curl_setopt($curl, CURLOPT_USERPWD, sprintf('%s:%s', $username, $password)); 50 50 51 //Don't output to stdout 52 $tempOutput = fopen('php://temp', 'w'); 53 curl_setopt($curl, CURLOPT_FILE, $tempOutput); 51 //Create a temp stream to upload to the old path (to zero the length) 52 $stream = fopen('php://temp', 'r'); 53 curl_setopt($curl, CURLOPT_UPLOAD, true); 54 curl_setopt($curl, CURLOPT_INFILE, $stream); 54 55 55 56 //Parse the URL to get the path to delete 56 57 $path = parse_url($url, PHP_URL_PATH); 57 curl_setopt($curl, CURLOPT_QUOTE, array(sprintf('rm "%s"', $path))); 58 curl_setopt($curl, CURLOPT_POSTQUOTE, array( 59 sprintf('rm "%s"', $path) 60 )); 58 61 59 62 if (curl_exec($curl) === false) 60 63 throw new Exception('cURL Error: ' . curl_error($curl)); 61 fclose($ tempOutput);64 fclose($stream); 62 65 curl_close($curl); 63 66
Note: See TracChangeset
for help on using the changeset viewer.
