View as source file or XML.
<strong>info.php</strong> <?php phpinfo(); ?>
-D PHP5_BINARY_DIR=[PHP INSTALL] [PHP INSTALL] is the directory where php.exe is located, i.e. "C:\php" -D PHP5_INCLUDE_DIR=[PHP INCLUDE DIR] [PHP INCLUDE DIR] is the directory where the php source is located, i.e. "C:\php-5.3.5" -D PHP5_LIBRARY=[PHP LIBRARY] [PHP LIBRARY] is the path where the php5ts.lib is located, this file is usually located in dev directory from the binary php installation, i.e. "C:/php/dev/php5ts.lib"After adding those lines CMAKE will add automatically the PHP Wrapper project and you will be able to get zorba_api.dll, which is the extension you can use in your php binary installation.
C:\zorba.exe -q '2+1' <?xml version="1.0" encoding="UTF-8"?> 3
C:\php\ext\
Modify your php.iniAdd the following line to php.ini extension=zorba_api.dll In your Zorba directory, locate the files zorba_api_wrapper.php and XQueryProcessor.php, copy them it to your include directory from where php can find it, this location is set on your php.ini file with the name <cope>include_path, i.e. ; Windows: "\path1;\path2" include_path = ".;C:\php\include" Restart Apache Http server Refresh your browser with previous info file: http://localhost/info.phpCheck if zorba_api is in the list of php known extensions.<html> <title>Zorba test</title> <body> <?php // include Zorba API require_once 'zorba_api_wrapper.php'; // create Zorba instance in memory $ms = InMemoryStore::getInstance(); $zorba = Zorba::getInstance($ms); try { // create and compile query string< $queryStr = '1+2'; $query = $zorba->compileQuery($queryStr); // execute query and display result $result = $query->execute(); echo $result; // clean up $query->destroy(); $zorba->shutdown(); InMemoryStore::shutdown($ms); } catch (Exception $e) { die('ERROR:' . $e->getMessage()); } ?> </body> </html>Point your browser to http://localhost/test.php and see the result.