You are here: Re: xmlhttprequest to get dynamically generated data seems to have a size limit « PHP Programming Language « IT news, forums, messages
Re: xmlhttprequest to get dynamically generated data seems to have a size limit

Posted by Thomas 'PointedEars' Lahn on 09/27/11 11:37

ted benedict wrote:

> 2. dynamically generated XML from a server side php script.
>
---------------------------------------------------------------------------------------
> the server side script looks like this:
> <?php
> header("Content-type: text/xml; charset=iso-8859-1");
> echo('<entries>');
> echo('<entry>');
> // more elements
> echo('</entry>');
> echo('</entries>');
> ?>

One more comment: Such coding is seldom wise.

1. `echo' is not a PHP function, but a language feature. Good code style
calls for not using the parantheses, unless the expression used is more
complicated.

2. You do not have to feed to PHP's parser what is not PHP code. Therefore
it is PHP, the PHP _Hypertext Preprocessor_ :)

Consider this:

<?php
// PHP code
?><entries>
<entry>
<?php
// PHP code that generates more elements
?>
</entry>
</entries><?php
PHP code
?>

See also <URL:http://www.php.net/manual/en/tutorial.firstpage.php>


X-Post & F'up2 comp.lang.php

PointedEars

 

Navigation:

[Reply to this 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

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