通常我不能访问test.php源代码,但我可以查看显示id的源代码(html)。
在href标记中:http://localhost/details.php?id=195320
在test.php中存在字母(链接):A B C D E F G H I J K L M N O p Q R s T U V W X Y Z这些字母对应于名称,它们的描述一致地显示/分组它们。
- 每个字母查看者:test.php?letter=a此页面包含162页:test.php?letter=a&page=1(到162)
- 另一页(letter=b)包含78页,依此类推(至字母z)
php甚至可以从这个文件中获取/提取id,显示这样的数据并将其存储在.txt文件中?
我在这里找到了一个在php中使用文件的教程
创建文件:
$ourFileName = "testFile.txt";
$ourFileHandle = fopen($ourFileName, 'w') or die("can't open file");
fclose($ourFileHandle);
写入:
$myFile = "testFile.txt";
$fh = fopen($myFile, 'w') or die("can't open file");
$stringData = "Bobby Bopper'n";
fwrite($fh, $stringData);
$stringData = "Tracy Tanner'n";
fwrite($fh, $stringData);
fclose($fh);
读取:
$myFile = "testFile.txt";
$fh = fopen($myFile, 'r');
$theData = fread($fh, 5);
fclose($fh);
echo $theData;