首页 > 解决方案 > MySQL 8.0.15 创建数组

问题描述

我们刚刚升级了我们的服务器,现在我们有 MySQL 8.0.15,以前我们有 MySQL 5.5.58 我们有一个创建数组的过程,但在新服务器上似乎没有发生。我只是想知道该过程是否在较新版本的 MySQL 中有所不同?谢谢保罗。

$save_path = "C:\\export\\"; 
if($values['AutoExport']){
    $data = 
    array(
    "JobNo"=>$values['JobNo'],
    "ContactEmail"=>$values['ContactEmail'];

    $domtree = new DOMDocument('1.0', 'UTF-8');
    $domtree->xmlStandalone = true;
    $xmlRoot = $domtree->createElement("table");
    $xmlRoot = $domtree->appendChild($xmlRoot);
    $xmlRow = $xmlRoot->appendChild($domtree->createElement("row"));
    foreach ( $data as $data_key => $child_data ) 
        $xmlRow->appendChild($domtree->createElement(htmlspecialchars($data_key),htmlspecialchars($child_data)));
    $domtree->formatOutput = true;
    $domtree->save($save_path."Job_".$values["JobNo"].".xml");
}

标签: phpmysql

解决方案


推荐阅读