$m = ($page-1)*$pagesize;
$sql = "SELECT * FROM user limit $m,$pagesize";
$sql = "SELECT * FROM user limit $m,$pagesize";
2016-02-04
<?php
$filename = '/data/webroot/usercode/resource/test.txt'; //这个地址中的code目录被取消了
//取得文件的大小并输出
echo filesize($filename);
$filename = '/data/webroot/usercode/resource/test.txt'; //这个地址中的code目录被取消了
//取得文件的大小并输出
echo filesize($filename);
2016-02-04
不是路径不对而是没写对
<?php
$filename = '/data/webroot/usercode/resource/test.txt';
$fp = fopen("$filename", 'rb');
while(!feof($fp)) {
echo fgets($fp); //读取一行
}
fclose($fp);
或者:
<?php
$filename = '/data/webroot/usercode/resource/test.txt';
$content = file_get_contents("$filename");
echo $content;
<?php
$filename = '/data/webroot/usercode/resource/test.txt';
$fp = fopen("$filename", 'rb');
while(!feof($fp)) {
echo fgets($fp); //读取一行
}
fclose($fp);
或者:
<?php
$filename = '/data/webroot/usercode/resource/test.txt';
$content = file_get_contents("$filename");
echo $content;
2016-02-03
我TM真醉了,我用正则测试工具[\w\s]+ 这种是绝对可以匹配到name 和 steven jobs的
偏偏在PHP里只能匹配到name,一种B了狗的感觉
偏偏在PHP里只能匹配到name,一种B了狗的感觉
2016-02-03