
php
Rajwang
这个作者很懒,什么都没留下…
展开
-
PHP 解析XML
PHP 解析XML $p = xml_parser_create(); xml_parse_into_struct($p, $data, $vals, $index);//data为xml参数 xml_parser_free($p); var_dump($vals)参考链接:http://php.net原创 2019-10-30 15:30:54 · 196 阅读 · 0 评论 -
foreach for Iterator性能对比
代码如下/** * Iterator,for,forEach比较 * date 2018-12-14 */public class Test { private static final int COUNT = 10000; private static List<Person> persons = new ArrayList<Person>(...原创 2018-12-14 11:15:29 · 957 阅读 · 0 评论 -
for foreach的区别
准备两个用于遍历的数组:$arr1=array(1=>'a', 3=>22, 5=>'b', 4=>'c', 8=>'d');$arr2=array('a'=>'aaa', 'b'=>'bbb', 'c'=>'ccc', 'd'=>'ddd', 'e'=>'eee');1.for循环原创 2018-12-14 11:21:51 · 160 阅读 · 0 评论 -
ifelse switch 区别
1、当被判断的值是常量(固定不变的值)时,switch的运行效率比ifelse的运行效率高; function test(){ $jiejie=3; // 变判断的值为常量 switch($jiejie){ case 1: echo '常量值为1'; break; ...原创 2018-12-14 11:29:55 · 760 阅读 · 0 评论 -
PHPMailer发送outlook日历邮件踩过的坑
$mail=new PHPMailer(); $startTime = "2018-12-18 16:00"; $endTime = "2018-12-18 18:00"; $inviteName = "这是一封邮件测试"; $title =原创 2018-12-11 11:58:06 · 2430 阅读 · 0 评论 -
Laravel Guzzle post file
function uploadimg(){ $client=new Client(); $url='http://www.example.com/photo'; $response = $client->request('POST',$url,[ 'multipart' => [ ...原创 2018-12-17 10:42:38 · 1331 阅读 · 2 评论