这个有问题吧,不执行sql语句直接提交,sql数据会被修改吗,为什么不执行反而是对的,我就懵逼了,是老师的教程写错了吧,我tm是真懵逼了!!!
2015-12-31
<?php
$p = '/<[^>]+>+(.*?)<[^>]+\>/i';
$str = "<b>example: </b><div align=left>this is a test</div>";
preg_match_all($p, $str, $matches);
print_r($matches);
$p = '/<[^>]+>+(.*?)<[^>]+\>/i';
$str = "<b>example: </b><div align=left>this is a test</div>";
preg_match_all($p, $str, $matches);
print_r($matches);
2015-12-31
本地实验这段代码,变化数字,结果很好玩
<?php
//$content = file_get_contents('F:/eula.2052.txt');
$fp = fopen('F:/eula.2052.txt','rb');
$contents = '';
while(!feof($fp)){
echo $contents .= fread($fp,4096); //一次读取4096个字符
}
fclose($fp);
?>
<?php
//$content = file_get_contents('F:/eula.2052.txt');
$fp = fopen('F:/eula.2052.txt','rb');
$contents = '';
while(!feof($fp)){
echo $contents .= fread($fp,4096); //一次读取4096个字符
}
fclose($fp);
?>
2015-12-30
<?php
$fruit = array("0" =>"苹果","1"=>"香蕉","2"=>"菠萝");//创建一个索引数组,索引数组的键是“0”,值是“苹果”
foreach($fruit as $key => $val)
if($key==0)
echo $key ."是".$val;
?>
$fruit = array("0" =>"苹果","1"=>"香蕉","2"=>"菠萝");//创建一个索引数组,索引数组的键是“0”,值是“苹果”
foreach($fruit as $key => $val)
if($key==0)
echo $key ."是".$val;
?>
2015-12-20