I am already using it with PHP 5, but i had to use the mod_rewrite module on apache to always redirect the .htmli files to htmli.php
These are the settings needed at httpd.conf
<VirtualHost *:8080>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot /path/to/your/wwwfolder/
ServerName localhost
When will we be seeing PHP support for this application? If it exists, a quick guide would be appreciated.
Thanks,
Acompw
We expect to release the first stable version, with full PHP support in a few weeks.
In the meantime, as proof of concept, you can look at the following files:
http://www.htmli.com/php/tabpane.htmli.txt (example file showing a tab)
http://www.htmli.com/php/menu.htmli.txt (example file showing a menu)
http://www.htmli.com/php/htmli.php.txt (HTMLi processor)
htmli.php is the file that converts HTMLi files into HTML files (it works on PHP5 although it can be ported to PHP4).
For example, when you go to...
http://www.htmli.com/php/htmli.php/tabpane.htmli
... the processor "compiles" tabpane.htmli into HTML code and outputs it to the browser. The same happens with
http://www.htmli.com/php/htmli.php/menu.htmli
You can download http://www.htmli.com/php/htmli-poc.tgz to see how it works (PHP5 and libxslt extension are required)
Matias.
I am already using it with PHP 5, but i had to use the mod_rewrite module on apache to always redirect the .htmli files to htmli.php
These are the settings needed at httpd.conf
<VirtualHost *:8080>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot /path/to/your/wwwfolder/
ServerName localhost
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule \.(htmli)$ /htmli/htmli.php
LogLevel debug
ErrorLog /path/to/your/logs/virtualhostapache.log
TransferLog /path/to/your/logs/virtualhostcom_access.log
CustomLog /path/to/your/logs/virtualhostapachecustom.log combined
RewriteLogLevel 9
RewriteLog /path/to/your/logs/virtualhostcom_modrewrite.log
</VirtualHost>
Try to use php 4, got error :
function 'exsl:node-set' not supported
My htmli.php :
<?php
$xml = substr($_SERVER['REQUEST_URI'], strpos($_SERVER['REQUEST_URI'], '.php')+4);
$xsl = "htmli/xsl/core.xsl";
$xh = xslt_create();
if (xslt_process($xh, $xml, $xsl, 'result.xml')) {
echo result.xml;
} else {
echo xslt_error($xh)." ".xslt_errno($xh);
}
xslt_free($xh);
?>
Shame on me ...
I have to use domxml and not xslt ...
Right code for php4 :
<?php
$xml = substr($_SERVER['REQUEST_URI'], strpos($_SERVER['REQUEST_URI'], '.php')+5);
//echo $xml;
$xsl = "htmli/xsl/core.xsl";
//echo $xsl;
$xmldoc = domxml_open_file($xml);
$xsldoc = domxml_xslt_stylesheet_file($xsl);
$params = array(
'base' => '../htmli',
'prefix' => '',
'libs' => 'std' );
$result = $xsldoc->process($xmldoc,$params);
//echo $result;
echo $xsldoc->result_dump_mem($result);
?>
If you can't use mod_rewrite in Apache, HTMLi can be used with PHP as in http://www.htmli.com/php-0.4.1/examples/helloworldmenu.php.txt
Installation of HTMLi under PHP5:
Download http://prdownloads.sourceforge.net/htmli/htmli-0.4.1rc3.zip and uncompress it in the root directory of your web site.
Include <? include_once ('htmli/php/htmli.php'); ?> in <head> section of the page.
Write HTMLi contents between <? HTMLiBegin(); ?> and <? HTMLiEnd();?>
Source code examples
http://www.htmli.com/php-0.4.1/examples/helloworldmenu.php
http://www.htmli.com/files/helloworldmenu.php.html