mirror of
				https://gitee.com/zoujingli/WeChatDeveloper.git
				synced 2025-11-04 10:52:08 +08:00 
			
		
		
		
	[更新]修改基础支持工具类
This commit is contained in:
		
							parent
							
								
									b9dfb8665f
								
							
						
					
					
						commit
						aa0c3c90e2
					
				@ -48,7 +48,6 @@ class Tools
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 根据文件后缀获取文件MINE
 | 
			
		||||
     * @param array $ext 文件后缀
 | 
			
		||||
@ -104,32 +103,6 @@ class Tools
 | 
			
		||||
        return "@{$filename};filename={$postname};type={$mimetype}";
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 以get访问模拟访问
 | 
			
		||||
     * @param string $url 访问URL
 | 
			
		||||
     * @param array $query GET数
 | 
			
		||||
     * @param array $options
 | 
			
		||||
     * @return bool|string
 | 
			
		||||
     */
 | 
			
		||||
    public static function get($url, $query = [], $options = [])
 | 
			
		||||
    {
 | 
			
		||||
        $options['query'] = $query;
 | 
			
		||||
        return self::doRequest('get', $url, $options);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 以post访问模拟访问
 | 
			
		||||
     * @param string $url 访问URL
 | 
			
		||||
     * @param array $data POST数据
 | 
			
		||||
     * @param array $options
 | 
			
		||||
     * @return bool|string
 | 
			
		||||
     */
 | 
			
		||||
    public static function post($url, $data = [], $options = [])
 | 
			
		||||
    {
 | 
			
		||||
        $options['data'] = $data;
 | 
			
		||||
        return self::doRequest('post', $url, $options);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 数组转XML内容
 | 
			
		||||
     * @param array $data
 | 
			
		||||
@ -202,6 +175,32 @@ class Tools
 | 
			
		||||
        return $result;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 以get访问模拟访问
 | 
			
		||||
     * @param string $url 访问URL
 | 
			
		||||
     * @param array $query GET数
 | 
			
		||||
     * @param array $options
 | 
			
		||||
     * @return bool|string
 | 
			
		||||
     */
 | 
			
		||||
    public static function get($url, $query = [], $options = [])
 | 
			
		||||
    {
 | 
			
		||||
        $options['query'] = $query;
 | 
			
		||||
        return self::doRequest('get', $url, $options);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 以post访问模拟访问
 | 
			
		||||
     * @param string $url 访问URL
 | 
			
		||||
     * @param array $data POST数据
 | 
			
		||||
     * @param array $options
 | 
			
		||||
     * @return bool|string
 | 
			
		||||
     */
 | 
			
		||||
    public static function post($url, $data = [], $options = [])
 | 
			
		||||
    {
 | 
			
		||||
        $options['data'] = $data;
 | 
			
		||||
        return self::doRequest('post', $url, $options);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * CURL模拟网络请求
 | 
			
		||||
     * @param string $method 请求方法
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user