Parse error: syntax error, unexpected 'file_put_contents' (T_STRING) in /26/603/Kh7j/index.php on line 10
2017-04-22
<?php
function thisIsPig($num){
if($num<2){
throw new Exception("数字必须比2小");
}
return true;
}
try{
/* thisIsPig(6);*/
thisIsPig(0);
echo "数字合法!!";
}catch(Exception $biubiubiu){
echo "数字的异常是:" .$biubiubiu->getMessage();
}
function thisIsPig($num){
if($num<2){
throw new Exception("数字必须比2小");
}
return true;
}
try{
/* thisIsPig(6);*/
thisIsPig(0);
echo "数字合法!!";
}catch(Exception $biubiubiu){
echo "数字的异常是:" .$biubiubiu->getMessage();
}
2017-04-22
Exception $eException $eException $eException $eException $eException $eException $eException $eException $eException $eException $eException $eException $eException $eException $eException $eException $eException $eException $eException $eException $eException $eException $eException $eException $e
2017-04-22
Warning: imagejpeg() expects parameter 1 to be resource, boolean given in /26/599/Kh7j/index.php on line 16
2017-04-22
now Cookie is:
Array
(
[Webstorm-e5e08923] => a1bb717f-bf73-4699-86a5-ad0a8b419b61
[Webstorm-a67a084] => 709b207d-88af-46d1-9b69-2cd162718cd5
[Hm_lvt_225ca8e7df28c2b7ba33a8400bcd693b] => 1492133841,1492147116
[test] => 1492767045
)
Array
(
[Webstorm-e5e08923] => a1bb717f-bf73-4699-86a5-ad0a8b419b61
[Webstorm-a67a084] => 709b207d-88af-46d1-9b69-2cd162718cd5
[Hm_lvt_225ca8e7df28c2b7ba33a8400bcd693b] => 1492133841,1492147116
[test] => 1492767045
)
2017-04-21
$str = '主要有以下几个文件:index.php, style.css, common.js';
//将目标字符串$str中的文件名替换后增加em标签
$p='/\w+\.\w+/i';
$replaceP='<em>$0</em>';
echo preg_replace($p,$replaceP,$str);
//将目标字符串$str中的文件名替换后增加em标签
$p='/\w+\.\w+/i';
$replaceP='<em>$0</em>';
echo preg_replace($p,$replaceP,$str);
2017-04-21
<?php
$p='/(\w+\@\w+\.\w+)/';
$subject = "my email is spark@imooc.com";
//在这里补充代码,实现正则匹配,并输出邮箱地址
preg_match($p,$subject,$match);
echo $match[1];
前面几节的结果总结一下 自己写出来了 感觉有点思路了
$p='/(\w+\@\w+\.\w+)/';
$subject = "my email is spark@imooc.com";
//在这里补充代码,实现正则匹配,并输出邮箱地址
preg_match($p,$subject,$match);
echo $match[1];
前面几节的结果总结一下 自己写出来了 感觉有点思路了
2017-04-21