在php中输出xml
<?php
header('Content-type: text/xml');
echo '<?xml version="1.0" encoding="GBK" ?>';
echo '<users>';
echo '<user>';
echo '<name>'; echo '小小菜鸟';
echo '</name>';
echo '<age>';
echo '24';
echo '</age>';
echo '<sex>';
echo '男';
echo '</sex>';
echo '</user>';
echo '<user>';
echo '<name>';
echo '艳艳';
echo '</name>';
echo '<age>';
echo '23';
echo '</age>';
echo '<sex>';
echo '女';
echo '</sex>';
echo '</user>';
echo '</users>';
?>
相关文档:
php编译gd出错!(已解决)
在32位ubuntu9.04上编译php5.2.12,到gd时make出错:
ext/gd/libgd/.libs/gd_png.o: In function
`php_gd_gdImageCreatefromPngCtx':
/home/test/php-5.2.12/ext/gd/libgd/gd_png.c:142: undefined reference to
`png_check_sig'
collect2: ld returned 1 exit status
make: *** [sapi/cli/p ......
这里也强烈推荐YII框架,这个年轻的框架由美国华人开发,名叫薛强。Yii Framwork是2009最佳PHP框架。
Yii 是一个基于组件、用于开发大型 Web 应用的高性能 PHP 框架。它将 Web 编程中的可重用性发挥到极致,能够显著加速开发进程。Yii(读作“易”)代表简单(easy)、高效( ......
zip.class.php
CODE:
[复制到剪切板]
<?
class
zip
{
var
$datasec
,
$ctrl_dir
= array();
var
$eof_ctrl_dir
=
"x50x4bx05x06x00x00x00x00"
;
var
$old_offset
=
0
; var
$dirs
......
have been studying parsing JSON from PHP using AJAX to display it in
the client side and jQuery had been a great help to me. Here is a very
simple code in parsing JSON using jQuery that i made.
tablejsondata.php
This file makes the request to a php file and displays the returned data into a tabl ......