使用zorba的php中的xquery [英] xquery in php using zorba

查看:164
本文介绍了使用zorba的php中的xquery的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直试图在php中使用xquery使用zorba没有运气:(

i安装了zorba Windows并将zorba_api.dll复制到php扩展目录并在php中添加此行.ini

extension = zorba_api.dll

并尝试了hello word example

i have been trying to use xquery in php using zorba no luck at all :(
i installed the zorba Windows and copied the zorba_api.dll to the php extension directory and add this line in the php.ini
extension=zorba_api.dll
and tried the hello word example

<?php 
require_once 'Zorba/XQueryProcessor.php'; 

$xquery = new XQueryProcessor(); 

$query = <<<'XQ'
  declare variable $world external; 
  <h1>Hello {$world}</h1>
XQ; 

$xquery->importQuery($query); 

$xquery->setVariable('world', 'World!'); 

echo $xquery->execute(); 
?>



但我收到此错误:(

解析错误:语法错误,意外$ end

帮助请求


but i get this error :(
Parse error: syntax error, unexpected $end
help pleas

推荐答案

xquery = new XQueryProcessor();

xquery = new XQueryProcessor();


query =<<< ' XQ'
声明变量
query = <<<'XQ' declare variable


world external;
< h1 > ; Hello {
world external; <h1>Hello {


这篇关于使用zorba的php中的xquery的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆