【发布时间】:2021-12-23 22:27:12
【问题描述】:
我有 2 个文件。 index.php 和 form.php
index.php
<?php
echo "123"
?>
form.php
<?php
$result = file_get_contents('http://localhost/fatsecret/index.php');
var_dump($result);
?>
我可以在 form.php 中看到结果“123”。但是当我去开发工具-网络时,我看不到对 index.php 的任何请求。为什么?这不会显示在 Firefox 和 chrome 开发工具中。
【问题讨论】:
-
浏览器没有做请求,服务器是。服务器也直接访问文件,因此浏览器不知道中间有请求。
标签: php http developer-tools web-developer-toolbar