在PHP中怎么调用xml文件? 最好是有实例的文章,http://www.php.net上的我看过了,看不大懂:P 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 如果你在win32环境下$source = new com("Microsoft.XMLDOM");$source->validateOnParse = TRUE;$source->async = FALSE;$source->load(realpath("/xml/data.xml"));echo $source.documentElement; 不久后肯定要转到Linux下使用,linux环境下应该怎样写?有无两种环境下都可以用的写法??? 另外还有几句该怎么改啊?Set rootNode = source.documentElementSet tableNode = source.selectSingleNode("/root/table[@tableName='test']/fieldclass")num=cint(tableNode.childNodes.length)if tableNode.childNodes(i).selectSingleNode("@key").text ="test" php中有domxml扩展库函数,不过好像没有支持gb2312中文编码的,至少我没有找到。在windows nt环境下用msxml当然不错了,不过没办法迁移到linux平台... 我要支持UTF-8编码的在linux平台下该用什么????? 有谁知UTF-8(16)如何转成其它的编码?(比如GB2312) 才知道的iconv函数 (php 4.3.1)GB2312 -- UTF-8iconv("GB2312","UTF-8",$text)UTF-8 -- GB2312iconv("UTF-8","GB2312",$text)曾尝试iconv("UTF-8","Big5",$text)但结果似乎不对 http://phpuser.com/articles_and_tutorials/index.php?search=xml http://chinese.pku.edu.cn/netstudy/php4gb/group.php-53.htmhttp://www.ccidnet.com/tech/focus/index-1.php3?specname=php 只是很简单的东西,PHP内置的XML函数是无法做事的 PHP编程问题 php中select 的值怎么在选择后赋给 text??? 用appserv-win32-2.5.7.exe安装后 Apache没有安装成功 散分 php url 传值问题 再问一个关于fwrite的问题 如何实现下拉菜单,请指教。 急!急!急!自写com组件访问数据库问题 手机端支付宝和pc端有区别吗?只要申请开通权限一样用吗? php实现2个数组输出问题 请问:如何用PHP动态生成一个下拉菜单 php中验证数据合法性的问题
$source = new com("Microsoft.XMLDOM");
$source->validateOnParse = TRUE;
$source->async = FALSE;
$source->load(realpath("/xml/data.xml"));
echo $source.documentElement;
有无两种环境下都可以用的写法???
Set rootNode = source.documentElement
Set tableNode = source.selectSingleNode("/root/table[@tableName='test']/fieldclass")num=cint(tableNode.childNodes.length)
if tableNode.childNodes(i).selectSingleNode("@key").text ="test"
在linux平台下该用什么?????
iconv函数 (php 4.3.1)GB2312 -- UTF-8
iconv("GB2312","UTF-8",$text)UTF-8 -- GB2312
iconv("UTF-8","GB2312",$text)曾尝试
iconv("UTF-8","Big5",$text)
但结果似乎不对
http://www.ccidnet.com/tech/focus/index-1.php3?specname=php