lib/fal/dropbox.php
public function write($file, $content, $type='sandbox')
	{
		$url = 'https://api-content.dropbox.com/1/files_put/';
		$result = $this->doOAuthCall($url,'PUT',null,$type,$file,$content);
		$result_body = json_decode($result['body'],true);
		if (!array_key_exists('error', $result_body)) {
			return $result_body;
		} else {
			trigger_error(sprintf(self::E_APIERROR, $result_body['error']));
			return false;
		}
	}
public function write($file, $content, $type='sandbox')
	{
		$url = 'https://api-content.dropbox.com/1/files_put/';
		$result = $this->doOAuthCall($url,'PUT',null,$type,$file,$content);
		$result_body = json_decode($result['body'],true);
		if (!array_key_exists('error', $result_body)) {
			return $result_body;
		} else {
			trigger_error(sprintf(self::E_APIERROR, $result_body['error']));
			return false;
		}
	}
public function write ( $ file , $ content , $ type = 'sandbox' ) { $ url = 'https://api-content.dropbox.com/1/files_put/' ; $ result = $ this -> doOAuthCall ( $ url , 'PUT' , null , $ type , $ file , $ content ) ; $ result_body = json_decode ( $ result [ 'body' ] , true ) ; if ( ! array_key_exists ( 'error' , $ result_body ) ) { return $ result_body ; } else { trigger_error ( sprintf ( self :: E_APIERROR , $ result_body [ 'error' ] ) ) ; return false ; } }
write file content
@param        $file      file path
@param        $content   file content
@param string $type      sandbox or dropbox
@return mixed
write file content