微信小程序与服务器的通讯
直接加载服务器数据 wx.request({ url: 'https://************/fenlei.php', data: { a: '' //参数 }, heade...
php 导出Excel
方法一【win下不乱码】 <?php header('Content-type: text/html; charset=utf-8'); header('Content-type:application/vnd.ms-excel;charset=UTF-8');...
PHP读取数据库记录转换为JSON的代码(API接口的SQL语句)
为了提供API接口,我们常常在读取数据库后,将数据转换为数组,通过json_encode转为JSON,即可满足使用需要。现将代码粘帖如下: 读取一条记录,转为数组...