我想得到一些网站源代码到网页作为使用php的结果。
这是我的html代码。我想添加php代码来结帐网站的源代码作为结果。
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<center>
<form method="post">
<h1>Website source code</h1>
<input type="text" name="url" placeholder="Website Url"><input type="submit" value=">>">
</form>
</center>
</body>
</html>这是我用来导出html源代码的php代码。
[[-- <?php $all_lines = file('example.com/');
foreach ($all_lines as $line_num => $line) {
echo "Code.-{$line_num}: " . htmlspecialchars($line) . "\n";
} ?> --]] –https://stackoverflow.com/questions/47659758
复制相似问题