摘要: 阅读全文
posted @ 2018-04-16 14:25 丶长情 阅读(202) 评论(0) 推荐(0) 编辑
摘要: 1.数组与字符串之间的相互转换。 (1)数组转为字符串 $array = ['1','2','3','4']; $str = implode(",",$array ); dump($str); (2)有分割号的字符串转为数组 $str = '1,2,3,4,5'; $result = explode 阅读全文
posted @ 2018-04-11 09:39 丶长情 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 在之前我写过php返回json数据简单实例 从5.2版本开始,PHP原生提供json_encode()和json_decode()函数,前者用于编码,后者用于解码。 一、json_encode() 1 2 3 4 <?php $arr = array ('a'=>1,'b'=>2,'c'=>3,'d 阅读全文
posted @ 2017-10-19 14:10 丶长情 阅读(69486) 评论(1) 推荐(0) 编辑
摘要: //get 路由 Route::get('/', 'WelcomeController@index'); Route::get('home', 'HomeController@index'); //路由分组 Route::group(['prefix' => 'Index'], function() 阅读全文
posted @ 2017-10-16 15:10 丶长情 阅读(151) 评论(1) 推荐(0) 编辑