public static function openBinary(ClientRuntimeContext $ctx, $serverRelativeUrl)
    {
        $serverRelativeUrl = rawurlencode($serverRelativeUrl);
        $url = $ctx->getServiceRootUrl() . "web/getfilebyserverrelativeurl('$serverRelativeUrl')/\$value";
        $options = new RequestOptions($url);
        $data = $ctx->executeQueryDirect($options);
        return $data;
    }
public static function openBinary(ClientRuntimeContext $ctx, $serverRelativeUrl)
    {
        $serverRelativeUrl = rawurlencode($serverRelativeUrl);
        $url = $ctx->getServiceRootUrl() . "web/getfilebyserverrelativeurl('$serverRelativeUrl')/\$value";
        $options = new RequestOptions($url);
        $data = $ctx->executeQueryDirect($options);
        return $data;
    }
public static function openBinary ( ClientRuntimeContext $ ctx , $ serverRelativeUrl ) { $ serverRelativeUrl = rawurlencode ( $ serverRelativeUrl ) ; $ url = $ ctx -> getServiceRootUrl ( ) . "web/getfilebyserverrelativeurl('$serverRelativeUrl')/\$value" ; $ options = new RequestOptions ( $ url ) ; $ data = $ ctx -> executeQueryDirect ( $ options ) ; return $ data ; }
Opens the file
@param ClientRuntimeContext $ctx
@param $serverRelativeUrl
@return mixed|string
@throws \Exception
Opens the file