test.php
来自「通过PHP读出数据库的记录内容」· PHP 代码 · 共 54 行
PHP
54 行
<?php
require_once 'services/vl_manager_sp_partner.php';
require_once 'services/vl_manager_sp_store.php';
if(isset($_GET['store_id']))
{
$store_id = $_GET['store_id'];
}
else
{
$store_id = 2;
}
$sp_partner = new VLManagerSPPartner();
$sp_store = new VLManagerSPStore();
$res = $sp_store->queryStoreBaseInfoById($store_id);
if($res == 1)
{
die();
}
$store_name = $res[2];
$store_list = $sp_partner->queryFirstPartners($store_id, "group by dst_store_id");
//$xml_file = $store_id.".xml";
//$fp = fopen($xml_file, "w");
echo "<?xml version='1.0' encoding='utf-8'?>";
echo "<stores>";
echo "<item>";
echo "<id>".$store_id."</id>";
echo "<name>".$store_name."</name>";
echo "<has_son>true</has_son>";
echo "</item>";
if($store_list != 1)
{
$count = count($store_list);
for($i = 0; $i < $count; $i ++)
{
$store_info = $sp_store->queryStoreBaseInfoById($store_list[$i][3]);
if($store_info != 1)
{
echo "<item>";
echo "<id>".$store_list[$i][3]."</id>";
echo "<name>".$store_info[2]."</name>";
echo "<has_son>true</has_son>";
echo "</item>";
}
}
}
echo "</stores>";
?>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?