Reply to Re: Evaluating php tags/documents outside of web server?

Your name:

Reply:


Posted by petersprc on 12/05/06 20:28

Hi,

Yes you could use PHP, for example:

foreach ($items as $item) {
ob_start();
require('xml-template.php');
$text = ob_get_contents();
ob_end_clean();
fwrite($sock, $text) or trigger_error('fwrite');
}

You could also build the XML tree programmatically. Some examples here:

http://wiki.cc/php/Dom_build

Isak wrote:
> I need to generate and send multiple xml documents over a socket.
>
> Is it feasible to use php as a templating language for these? How would
> i go about that?
>
> I figure i _could_ make them into 'normal pages' and fetch the contents
> using some http library, but that doesn't sound too elegant. There has
> to be a better way?
>
>
> Thanks,
> Isak

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация