⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 test.php

📁 通过PHP读出数据库的记录内容
💻 PHP
字号:
<?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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -