Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
是否可以将PHP XML导出器转换为Wordpress插件?_Php_Xml_Wordpress - Fatal编程技术网

是否可以将PHP XML导出器转换为Wordpress插件?

是否可以将PHP XML导出器转换为Wordpress插件?,php,xml,wordpress,Php,Xml,Wordpress,我使用mysql1制作了一个PHP脚本,其中包含一个表单,可用于将数据从数据库导出到XML文件。我的问题是,我可以把它用作Wordpress插件吗 As you know, mysql_fetch_assoc() processes the results returned by mysql_query(). $wpdb class methods typically return results of a query to the wordpress database similar to w

我使用mysql1制作了一个PHP脚本,其中包含一个表单,可用于将数据从数据库导出到XML文件。我的问题是,我可以把它用作Wordpress插件吗

As you know, mysql_fetch_assoc() processes the results returned by mysql_query(). $wpdb class methods typically return results of a query to the wordpress database similar to what mysql_query() would do. $wpdb class methods do not process such results as mysql_fetch_assoc() would do, so there is no true equivalent.
我面临的最大问题是wordpress使用$wpdb与数据库交互,就像我一直使用的PHP MySQL函数一样。有没有办法将PHP脚本转换成wordpress插件

As you know, mysql_fetch_assoc() processes the results returned by mysql_query(). $wpdb class methods typically return results of a query to the wordpress database similar to what mysql_query() would do. $wpdb class methods do not process such results as mysql_fetch_assoc() would do, so there is no true equivalent.
我通常对$wpdb查询的结果执行的操作与您的示例类似:

foreach($结果为$行){ //在此处执行代码以处理db结果