易截截图软件、单文件、免安装、纯绿色、仅160KB

php下通过xml_parse解析xml文件

xml_parse解析xml文件时候,
很有可能不仅仅调用一次character_handler。
所以在获得xml节点的文本信息的时候,要用连接运算".="。
参考 http://jp2.php.net/manual/ro/function.xml-set-character-data-handler.php
ken at positive-edge dot com
30-Jan-2002
01:20
the function handler is called several times when it parses the
character data.  It doesn't return the entire string as it suggests. 
There are special exceptions that will always force the parser to stop
scanning and call the character data handler.  This is when:
- The parser runs into an Entity Declaration, such as & (&)
or ' (�)
- The parser finishes parsing an entity
- The parser runs into the new-line character (\n)
- The parser runs into a series of tab characters (\t)
And perhaps others.
For instance, if we have this xml content:
<mytag name=�Ken Egervari� title=�Chief Technology Officer�>
    Ken has been Positive Edge&apos;s Chief Technology Officer for 2
years.
</mytag>
The parser will call the character data handler 6 times.  This is what
will happen:
1    \n
2    \t
3    Ken has been Positive Edge
4    �
5    s Chief Technology Officer for 2 years.
6    \n
I hope that helps people out.


相关文档:

PHP出现Warning:Illegal offset type in

Warning
: Illegal offset type in
Warning
: Illegal offset type in isset or
empty in
前几天写程序的时候碰到一个这种错误提示
如果你使用这样的表示方法如下:
$arr = array();
class a
{
}
$o = new a;
echo $arr[$o];
就会出现上面的错误提示,因为不能使用实例化的对象来作为数组的索引,或者在使用i ......

php 解析 excel 存储到 mysql 乱码


编码是个很基础的问题,也是大家很容易忽略的问题,写代码之前多多考虑,以后会少很多麻烦。
PHP发展了不少,现在pear用起来很方便,其中就有相关的class来读取Excel文件里面的内容,如果不想使用pear的话,可以考虑使用excel_class.php,google一下,可以找到这个class的source code下载,也能找到基本的example c ......

linux,nginx,mysql,php安装备忘

niginx安装流程
软件下载:--->
mkdir -p /home/dancebear/programe
cd /home/dancebear/programe
wget http://sysoev.ru/nginx/nginx-0.6.31.tar.gz
wget http://www.php.net/get/php-5.2.6.tar.gz/from/this/mirror
wget http://php-fpm.anight.org/downloads/head/php-5.2.6-fpm-0.5.8.diff.gz
wget http://dev ......

学习php Reflection(二)

(4)映射类(ReflectionClass)
ReflectionClass类允许你反向映射类。
<?
php
interface MySerializable  
{    
// ...}
class My
Object
 
{    
// ...}
/** A counter class */
class 
Counter 
exten ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号