search
HomeBackend DevelopmentPHP TutorialEasily parse XML with PHP5_PHP tutorial
Easily parse XML with PHP5_PHP tutorialJul 21, 2016 pm 04:00 PM
php5saxxmlthreefunctionWayConstructuseofOwnwantparseeasyreturn

用 sax 方式的时候,要自己构建3个函数,而且要直接用这三的函数来返回数据,要求较强的逻辑。在处理不同结构的 xml 的时候,还要重新进行构造这三个函数,麻烦!

用 dom 方式,倒是好些,但是他把每个节点都看作是一个 node,,操作起来要写好多的代码,麻烦!

网上有好多的开源的 xml 解析的类库,以前看过几个,但是心里总是觉得不踏实,感觉总是跟在别人的屁股后面。

这几天在搞 Java,挺累的,所以决定换换脑袋,写点 PHP 代码,为了防止以后 XML 解析过程再令我犯难,就花了一天的时间写了下面一个 XML 解析的类,于是就有了下面的东西。

实现方式是通过包装“sax方式的解析结果”来实现的。总的来说,对于我个人来说挺实用的,性能也还可以,基本上可以完成大多数的处理要求。

功能:
1\ 对基本的 XML 文件的节点进行 查询 / 添加 / 修改 / 删除 工作。
2\ 导出 XML 文件的所有数据到一个数组里面。
3\ 整个设计采用了 OO 方式,在操作结果集的时候,使用方法类似于 dom

缺点:
1\ 每个节点最好都带有一个id(看后面的例子),每个“节点名字”=“节点的标签_节点的id”,如果这个 id 值没有设置,程序将自动给他产生一个 id,这个 id 就是这个节点在他的上级节点中的位置编号,从 0 开始。
2\ 查询某个节点的时候可以通过用“|”符号连接“节点名字”来进行。这些“节点名字”都是按顺序写好的上级节点的名字。

使用说明:
运行下面的例子,在执行结果页面上可以看到函数的使用说明

代码是通过 PHP5 来实现的,在 PHP4 中无法正常运行。

由于刚刚写完,所以没有整理文档,下面的例子演示的只是一部分的功能,代码不是很难,要是想知道更多的功能,可以研究研究源代码。

目录结构:

test.php
test.xml
xml / SimpleDocumentBase.php
xml / SimpleDocumentNode.php
xml / SimpleDocumentRoot.php
xml / SimpleDocumentParser.php
 
文件:test.xml



 华联
 

北京长安街-9999号

 连锁超市
 
 
   food11
   12.90
 

 
   food12
   22.10
   好东西推荐
 

 

 
 
   tel21
   1290
 

 

 
 
   coat31
   112
 

 
   coat32
   45
 

 

 
 
   hot41
   99
 

 

文件:test.php

require_once "xml/SimpleDocumentParser.php";
require_once "xml/SimpleDocumentBase.php";
require_once "xml/SimpleDocumentRoot.php";
require_once "xml/SimpleDocumentNode.php";
$test = new SimpleDocumentParser();
$test->parse("test.xml");
$dom = $test->getSimpleDocument();
echo "
";
echo "
";
echo "下面是通过函数getSaveData()返回的整个xml数据的数组";
echo "

";
print_r($dom->getSaveData());
echo "
";
echo "下面是通过setValue()函数,给给根节点添加信息,添加后显示出结果xml文件的内容";
echo "

";
$dom->setValue("telphone", "123456789");
echo htmlspecialchars($dom->getSaveXml());
echo "
";
echo "下面是通过getNode()函数,返回某一个分类下的所有商品的信息";
echo "

";
$obj = $dom->getNode("cat_food");
$nodeList = $obj->getNode();
foreach($nodeList as $node){
    $data = $node->getValue();
    echo "商品名:".$data[name]."
";
    print_R($data);
    print_R($node->getAttribute());
}
echo "
";
echo "下面是通过findNodeByPath()函数,返回某一商品的信息";
echo "

";
$obj = $dom->findNodeByPath("cat_food|goods_food11");
if(!is_object($obj)){
    echo "该商品不存在";
}else{
    $data = $obj->getValue();
    echo "商品名:".$data[name]."
";
    print_R($data);
    print_R($obj->getAttribute());
}
echo "
";
echo "下面是通过setValue()函数,给商品\"food11\"添加属性, 然后显示添加后的结果";
echo "

";
$obj = $dom->findNodeByPath("cat_food|goods_food11");
$obj->setValue("leaveword", array("value"=>"这个商品不错", "attrs"=>array("author"=>"hahawen", "date"=>date('Y-m-d'))));
echo htmlspecialchars($dom->getSaveXml());
echo "
";
echo "下面是通过removeValue()/removeAttribute()函数,给商品\"food11\"改变和删除属性, 然后显示操作后的结果";
echo "

";
$obj = $dom->findNodeByPath("cat_food|goods_food12");
$obj->setValue("name", "new food12");
$obj->removeValue("desc");
echo htmlspecialchars($dom->getSaveXml());
echo "
";
echo "下面是通过createNode()函数,添加商品, 然后显示添加后的结果";
echo "

";
$obj = $dom->findNodeByPath("cat_food");
$newObj = $obj->createNode("goods", array("id"=>"food13"));
$newObj->setValue("name", "food13");
$newObj->setValue("price", 100);
echo htmlspecialchars($dom->getSaveXml());
echo "
";
echo "下面是通过removeNode()函数,删除商品, 然后显示删除后的结果";
echo "

";
$obj = $dom->findNodeByPath("cat_food");
$obj->removeNode("goods_food12");
echo htmlspecialchars($dom->getSaveXml());

?>
 
文件:SimpleDocumentParser.php
 
/**
 *================================================
 * 
 * @author     hahawen(大龄青年) 
 * @since      2004-12-04
 * @copyright  Copyright (c) 2004, NxCoder Group 
 *
 *================================================
 */
 /**
 * class SimpleDocumentParser
 * use SAX parse xml file, and build SimpleDocumentObject 
 * all this pachage's is work for xml file, and method is action as DOM.
 *
 * @package SmartWeb.common.xml
 * @version 1.0
 */
 class SimpleDocumentParser
 {
     private $domRootObject = null;
     private $currentNO = null;
     private $currentName  = null;
     private $currentValue = null;
     private $currentAttribute = null;
     public
     function getSimpleDocument()
     {
         return $this->domRootObject;
     }
     public function parse($file)
     {
         $xmlParser = xml_parser_create();
         xml_parser_set_option($xmlParser,XML_OPTION_CASE_FOLDING,
         0);
         xml_parser_set_option($xmlParser,XML_OPTION_SKIP_WHITE, 1);
         xml_parser_set_option($xmlParser,
         XML_OPTION_TARGET_ENCODING, 'UTF-8');
         xml_set_object($xmlParser, $this);
         xml_set_element_handler($xmlParser, "startElement", "endElement");
         xml_set_character_data_handler($xmlParser,
         "characterData");
         if (!xml_parse($xmlParser, file_get_contents($file)))
         die(sprintf("XML error: %s at line %d", xml_error_string(xml_get_error_code($xmlParser)),
         xml_get_current_line_number($xmlParser)));
         xml_parser_free($xmlParser);
     }
     private function startElement($parser, $name, $attrs)
     {
         $this->currentName = $name;
         $this->currentAttribute = $attrs;
         if($this->currentNO == null)
         {
             $this->domRootObject = new SimpleDocumentRoot($name);
             $this->currentNO = $this->domRootObject;
         }
         else
         {
             $this->currentNO = $this->currentNO->createNode($name, $attrs);
         }
     }
     private function endElement($parser, $name)
     {
         if($this->currentName==$name)
         {
             $tag = $this->currentNO->getSeq();
             $this->currentNO  = $this->currentNO->getPNodeObject();
             if($this->currentAttribute!=null && sizeof($this->currentAttribute)>0)
             $this->currentNO->setValue($name, array('value'=>$this->currentValue, 'attrs'=>$this->currentAttribute));
             else
             $this->currentNO->setValue($name, $this->currentValue);
             $this->currentNO->removeNode($tag);
         }
         else
         {
             $this->currentNO = (is_a($this->currentNO, 'SimpleDocumentRoot'))?   null:
             $this->currentNO->getPNodeObject();
         }
     }
     private function characterData($parser,  $data)
     {
         $this->currentValue = iconv('UTF-8', 'GB2312', $data);
     }

     function __destruct()
     {
         unset($this->domRootObject);
     }
 }
?>
 
文件:SimpleDocumentBase.php
 
/**
 *=================================================
 *
 * @author     hahawen(大龄青年) 
 * @since      2004-12-04
 * @copyright  Copyright (c) 2004, NxCoder Group
 *
 *=================================================
 */
 /**
 * abstract class SimpleDocumentBase
 * base class for xml file parse
 * all this pachage's is work for xml file, and method is action as DOM.
 *
 * 1\ add/update/remove data of xml file.
 * 2\ explode data to array.
 * 3\ rebuild xml file
 *
 * @package SmartWeb.common.xml
 * @abstract
 * @version 1.0
 */
 abstract class SimpleDocumentBase
 {
     private $nodeTag = null;
     private $attributes = array();
     private $values =
     array();
     private $nodes = array();
     function __construct($nodeTag)
     {
         $this->nodeTag = $nodeTag;
     }
     public function getNodeTag()
     {
         return $this->nodeTag;
     }
     public function setValues($values){
         $this->values = $values;
     }
     public function setValue($name, $value)
     {
         $this->values[$name] = $value;
     }
     public function getValue($name=null)
     {
         return $name==null?
         $this->values: $this->values[$name];
     }
 
     public function removeValue($name)
     {
         unset($this->values["$name"]);
     }
     public function setAttributes($attributes){
         $this->attributes = $attributes;
     }
     public function setAttribute($name, $value)
     {
         $this->attributes[$name] = $value;
     }
     public function getAttribute($name=null)
     {
         return $name==null? $this->attributes:
         $this->attributes[$name];
     }
     public function removeAttribute($name)
     {
         unset($this->attributes["$name"]);
     }
     public function getNodesSize()
     {
         return sizeof($this->nodes);
     }
     protected function setNode($name, $nodeId)
     {
         $this->nodes[$name]
         = $nodeId;
     }
     public abstract function createNode($name, $attributes);
     public abstract function removeNode($name);
     public abstract function getNode($name=null);
     protected function getNodeId($name=null)
     {
         return $name==null? $this->nodes: $this->nodes[$name];
     }
     protected function createNodeByName($rootNodeObj, $name, $attributes, $pId)
     {
         $tmpObject = $rootNodeObj->createNodeObject($pId, $name, $attributes);
         $key = isset($attributes[id])?
         $name.'_'.$attributes[id]: $name.'_'.$this->getNodesSize();
         $this->setNode($key, $tmpObject->getSeq());
         return $tmpObject;
     }
     protected function removeNodeByName($rootNodeObj, $name)
     {
         $rootNodeObj->removeNodeById($this->getNodeId($name));
         if(sizeof($this->nodes)==1)
         $this->nodes = array();
         else
         unset($this->nodes[$name]);
     }
     protected function getNodeByName($rootNodeObj, $name=null)
     {
         if($name==null)
         {
             $tmpList = array();
             $tmpIds = $this->getNodeId();
             foreach($tmpIds as $key=>$id)
             $tmpList[$key] = $rootNodeObj->getNodeById($id);
             return $tmpList;
         }
         else
         {
             $id = $this->getNodeId($name);
             if($id===null)
             {
                 $tmpIds = $this->getNodeId();
                 foreach($tmpIds as $tkey=>$tid)
                 {
                     if(strpos($key, $name)==0)
                     {
                         $id = $tid;
                         break;
                     }
                 }
             }
             return $rootNodeObj->getNodeById($id);
         }
     }
     public function findNodeByPath($path)
     {
         $pos = strpos($path, '|');
         if($pos         {
             return $this->getNode($path);

         }
         else
         {
             $tmpObj = $this->getNode(substr($path, 0,
             $pos));
             return is_object($tmpObj)?
             $tmpObj->findNodeByPath(substr($path,
             $pos+1)):
             null;
         }
     }
     public function getSaveData()
     {
         $data = $this->values;
         if(sizeof($this->attributes)>0)
         $data[attrs] = $this->attributes;
         $nodeList = $this->getNode();

         if($nodeList==null)
         return $data;
         foreach($nodeList as $key=>$node)
         {
             $data[$key] = $node->getSaveData();
         }
         return $data;
     }

     public function getSaveXml($level=0)
     {
         $prefixSpace
         = str_pad("",
         $level, "\t");
         $str = "$prefixSpacenodeTag";
 
         foreach($this->attributes as $key=>$value)
         $str .= " $key=\"$value\"";
         $str .= ">\r\n";

         foreach($this->values as $key=>$value){
             if(is_array($value))
             {
                 $str .= "$prefixSpace\t
                 foreach($value[attrs] as $attkey=>$attvalue)
                 $str .= " $attkey=\"$attvalue\"";
                 $tmpStr = $value[value];

             }
             else
             {
                 $str .= "$prefixSpace\t
                 $tmpStr = $value;
             }
             $tmpStr = trim(trim($tmpStr, "\r\n"));
             $str .= ($tmpStr===null || $tmpStr==="")? " />\r\n": ">$tmpStr$key>\r\n";
         }
         foreach($this->getNode() as $node)
         $str .= $node->getSaveXml($level+1)."\r\n";

         $str .= "$prefixSpace$this->nodeTag>";
         return $str;
     }
 
     function __destruct()
     {
         unset($this->nodes, $this->attributes, $this->values);
     }
 }
?>

 
文件:SimpleDocumentRoot.php
 
/**
 *==============================================
 *
 * @author     hahawen(大龄青年) 
 * @since      2004-12-04
 * @copyright  Copyright (c) 2004, NxCoder Group
 *
 *==============================================
 */
 /**
 * class SimpleDocumentRoot
 * xml root class, include values/attributes/subnodes.
 * all this pachage's is work for xml file, and method is action as DOM.
 *
 * @package SmartWeb.common.xml
 * @version 1.0
 */
class SimpleDocumentRoot extends SimpleDocumentBase
{
    private $prefixStr = '';
    private $nodeLists = array();
    function __construct($nodeTag)
    {
        parent::__construct($nodeTag);
    }
    public function createNodeObject($pNodeId, $name, $attributes)
    {
        $seq = sizeof($this->nodeLists);
        $tmpObject = new SimpleDocumentNode($this,
        $pNodeId, $name, $seq);
        $tmpObject->setAttributes($attributes);
        $this->nodeLists[$seq] = $tmpObject;
        return $tmpObject;
    }
    public function removeNodeById($id)
    {
        if(sizeof($this->nodeLists)==1)
        $this->nodeLists = array();
        else
        unset($this->nodeLists[$id]);
    }
    public function getNodeById($id)
    {
        return $this->nodeLists[$id];
    }
    public function createNode($name, $attributes)
    {
        return $this->createNodeByName($this, $name, $attributes, -1);
    }
    public function removeNode($name)
    {
        return $this->removeNodeByName($this, $name);
    }
    public function getNode($name=null)
    {
        return $this->getNodeByName($this, $name);
    }
    public function getSaveXml()
    {
        $prefixSpace = "";
        $str = $this->prefixStr."\r\n";
        return $str.parent::getSaveXml(0);
    }
}
?>
 
文件:SimpleDocumentNode.php
 
/**
 *===============================================
 *
 * @author     hahawen(大龄青年) 
 * @since      2004-12-04
 * @copyright  Copyright (c) 2004, NxCoder Group
 *
 *===============================================
 */
 /**
 * class SimpleDocumentNode
 * xml Node class, include values/attributes/subnodes.
 * all this pachage's is work for xml file, and method is action as DOM.
 *
 * @package SmartWeb.common.xml
 * @version 1.0
 */
 class SimpleDocumentNode extends SimpleDocumentBase
 {
     private $seq = null;
     private $rootObject = null;
     private $pNodeId = null;
     function __construct($rootObject, $pNodeId, $nodeTag, $seq)
     {
         parent::__construct($nodeTag);
         $this->rootObject = $rootObject;
         $this->pNodeId = $pNodeId;
         $this->seq = $seq;
     }
     public function getPNodeObject()
     {
         return ($this->pNodeId==-1)?
         $this->rootObject:
         $this->rootObject->getNodeById($this->pNodeId);
     }
     public function getSeq(){
         return $this->seq;
     }
     public function createNode($name, $attributes)
     {
         return $this->createNodeByName($this->rootObject,
         $name, $attributes,
         $this->getSeq());
     }
     public function removeNode($name)
     {
         return $this->removeNodeByName($this->rootObject, $name);
     }

     public function getNode($name=null)
     {
         return $this->getNodeByName($this->rootObject,
         $name);
     }
 }
?>

 
下面是例子运行对结果
 

下面是通过函数getSaveData()返回的整个xml数据的数组
Array
(
    [name] => 华联
    [address] => 北京长安街-9999号
    [desc] => 连锁超市
    [cat_food] => Array
        (
            [attrs] => Array
                (
                    [id] => food
                )

            [goods_food11] => Array
                (
                    [name] => food11
                    [price] => 12.90
                    [attrs] => Array
                        (
                            [id] => food11
                        )

                )

            [goods_food12] => Array
                (
                    [name] => food12
                    [price] => 22.10
                    [desc] => Array
                        (
                            [value] => 好东西推荐
                            [attrs] => Array
                                (
                                    [creator] => hahawen
                                )

                        )

                    [attrs] => Array
                        (
                            [id] => food12
                        )

                )

        )

    [cat_1] => Array
        (
            [goods_tel21] => Array
                (
                    [name] => tel21
                    [price] => 1290
                    [attrs] => Array
                        (
                            [id] => tel21
                        )

                )

        )

    [cat_coat] => Array
        (
            [attrs] => Array
                (
                    [id] => coat
                )

            [goods_coat31] => Array
                (
                    [name] => coat31
                    [price] => 112
                    [attrs] => Array
                        (
                            [id] => coat31
                        )

                )

            [goods_coat32] => Array
                (
                    [name] => coat32
                    [price] => 45
                    [attrs] => Array
                        (
                            [id] => coat32
                        )

                )

        )

    [special_hot] => Array
        (
            [attrs] => Array
                (
                    [id] => hot
                )

            [goods_0] => Array
                (
                    [name] => hot41
                    [price] => 99
                )

        )

)

下面是通过setValue()函数,给给根节点添加信息,添加后显示出结果xml文件的内容


华联
北京长安街-9999号

连锁超市
123456789

 
   food11
   12.90
 

 
   food12
   22.10
   好东西推荐
 



 
   tel21
   1290
 



 
   coat31
   112
 

 
   coat32
   45
 



 
   hot41
   99
 



下面是通过getNode()函数,返回某一个分类下的所有商品的信息
商品名:food11
Array
(
    [name] => food11
    [price] => 12.90
)
Array
(
    [id] => food11
)
商品名:food12
Array
(
    [name] => food12
    [price] => 22.10
    [desc] => Array
        (
            [value] => 好东西推荐
            [attrs] => Array
                (
                    [creator] => hahawen
                )

        )

)
Array
(
    [id] => food12
)

下面是通过findNodeByPath()函数,返回某一商品的信息
商品名:food11
Array
(
    [name] => food11
    [price] => 12.90
)
Array
(
    [id] => food11
)

下面是通过setValue()函数,给商品"food11"添加属性, 然后显示添加后的结果


华联
北京长安街-9999号

连锁超市
123456789

 
   food11
   12.90
   这个商品不错
 

 
   food12
   22.10
   好东西推荐
 



 
   tel21
   1290
 



 
   coat31
   112
 

 
   coat32
   45
 



 
   hot41
   99
 



下面是通过removeValue()/removeAttribute()函数,给商品"food11"改变和删除属性, 然后显示操作后的结果


华联
北京长安街-9999号

连锁超市
123456789

 
   food11
   12.90
   这个商品不错
 

 
   new food12
   22.10
 



 
   tel21
   1290
 



 
   coat31
   112
 

 
   coat32
   45
 



 
   hot41
   99
 



下面是通过createNode()函数,添加商品, 然后显示添加后的结果


华联
北京长安街-9999号

连锁超市
123456789

 
   food11
   12.90
   这个商品不错
 

 
   new food12
   22.10
 

 
   food13
   100
 



 
   tel21
   1290
 



 
   coat31
   112
 

 
   coat32
   45




hot41
99



The following is to delete the product through the removeNode() function, and then display the result after deletion


Hualian
Beijing Chang'an Street-9999 No.

Supermarket chain
123456789


food11
12.90
This product is good


food13
< ;price>100





1290




coat31
112


coat32
45




hot41
99


www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/317153.htmlTechArticleWhen using the sax method, you need to build three functions yourself, and use these three functions directly to return data , requiring strong logic. When processing xml with different structures, you have to re...
Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
php5和php8有什么区别php5和php8有什么区别Sep 25, 2023 pm 01:34 PM

php5和php8的区别在性能、语言结构、类型系统、错误处理、异步编程、标准库函数和安全性等方面。详细介绍:1、性能提升,PHP8相对于PHP5来说在性能方面有了巨大的提升,PHP8引入了JIT编译器,可以对一些高频执行的代码进行编译和优化,从而提高运行速度;2、语言结构改进,PHP8引入了一些新的语言结构和功能,PHP8支持命名参数,允许开发者通过参数名而不是参数顺序等等。

初学者也能轻松掌握:PyQT安装指南详细解析初学者也能轻松掌握:PyQT安装指南详细解析Feb 18, 2024 pm 06:06 PM

小白也能轻松上手:PyQT安装教程详解PyQT是一款基于Python语言的GUI开发工具包,它可以帮助开发者快速、简单地创建各种美观的图形用户界面。对于想要从零开始学习PyQT的初学者来说,安装PyQT可能是一个比较困难的第一步。本文将详细介绍PyQT的安装步骤,并提供具体的代码示例,帮助小白轻松上手。第一步:安装Python在安装PyQT之前,首先需要确保

Python编程解析百度地图API文档中的坐标转换功能Python编程解析百度地图API文档中的坐标转换功能Aug 01, 2023 am 08:57 AM

Python编程解析百度地图API文档中的坐标转换功能导读:随着互联网的快速发展,地图定位功能已经成为现代人生活中不可或缺的一部分。而百度地图作为国内最受欢迎的地图服务之一,提供了一系列的API供开发者使用。本文将通过Python编程,解析百度地图API文档中的坐标转换功能,并给出相应的代码示例。一、引言在开发中,我们有时会涉及到坐标的转换问题。百度地图AP

PHP8.0中的XML解析库PHP8.0中的XML解析库May 14, 2023 am 08:19 AM

随着PHP8.0的发布,许多新特性都被引入和更新了,其中包括XML解析库。PHP8.0中的XML解析库提供了更快的解析速度和更好的可读性,这对于PHP开发者来说是一个重要的提升。在本文中,我们将探讨PHP8.0中的XML解析库的新特性以及如何使用它。什么是XML解析库?XML解析库是一种软件库,用于解析和处理XML文档。XML是一种用于将数据存储为结构化文档

php5如何改80端口php5如何改80端口Jul 24, 2023 pm 04:57 PM

php5改80端口的方法:1、编辑Apache服务器的配置文件中的端口号;2、辑PHP的配置文件以确保PHP在新端口上工作;3、重启Apache服务器,PHP应用程序将开始在新的端口上运行。

PHP 爬虫实战之获取网页源码和内容解析PHP 爬虫实战之获取网页源码和内容解析Jun 13, 2023 am 10:46 AM

PHP爬虫是一种自动化获取网页信息的程序,它可以获取网页代码、抓取数据并存储到本地或数据库中。使用爬虫可以快速获取大量的数据,为后续的数据分析和处理提供巨大的帮助。本文将介绍如何使用PHP实现一个简单的爬虫,以获取网页源码和内容解析。一、获取网页源码在开始之前,我们应该先了解一下HTTP协议和HTML的基本结构。HTTP是HyperText

推荐哪款鼠标连点器软件使用效果较好?推荐哪款鼠标连点器软件使用效果较好?Jan 02, 2024 pm 07:54 PM

用什么鼠标连点器比较好对于连点器,我推荐使用AutoClicker。它是一款简单易用的鼠标连点软件,可以帮助你自动点击鼠标。原因是AutoClicker具有以下优点1.界面简洁直观,操作简单,适合初学者使用。2.支持自定义点击间隔时间,可以根据需要调整点击速度。3.可以设置点击次数或持续点击,满足不同的需求。4.免费软件,无需付费购买。如果你想使用连点器,可以尝试一下AutoClicker。生死狙击2罗技鼠标宏怎么设置以下是在生死狙击2中设置罗技鼠标宏的步骤:1.首先,确保你已经购买并安装了罗技

php5没有监听9000端口如何解决php5没有监听9000端口如何解决Jul 10, 2023 pm 04:01 PM

php5没有监听9000端口解决方法步骤:1、检查PHP-FPM配置文件;2、重启PHP-FPM服务;3、关闭防火墙或配置端口转发;4、检查其他进程是否占用9000端口。

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment