小编bri*_*ant的帖子

什么PHP命令会窥视页面并记录其HTML代码(源代码)?

请问,请告诉我PHP中的命令(或其组合)是否会通过URL检查网页,并可能将其代码(HTML)下载到变量中?好吧,我建议使用护目镜应用引擎这个位置,但我也很好奇q有关如何该任务的多少可以PHP执行.

php url open-source

1
推荐指数
1
解决办法
144
查看次数

使用$ _POST变量的PHP if语句似乎不起作用.为什么?

在一台PHP服务器上,我有两个文件.一个文件(名称为"first.php")包含以下代码:

<html>
<head>
<title>First Page</title>
</head>
<body>
Please enter your password and age:
<form action="pass.php" method="post">
Name: <input type="text" name="fname" />
Age: <input type="text" name="age" />
<input type="submit" />
</form>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)

另一个文件("pass.php")包含以下代码:

<html>
<head>
<title>Secon Page</title>
</head>
<body>
<?php
if ($fname=="Jack")
  echo "You are Jack!";
else
  echo "You are not Jack!";
?>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)

据我了解,如果用户在第一页输入"Jack",则第二页应显示"You are Jack!" 线,但它不会发生.为什么会这样?

php variables post

1
推荐指数
1
解决办法
5737
查看次数

什么是限制访问我的网页的HTML代码?

我有一个关于HTML的问题.我知道有这种机制不允许用户直接访问网页,除非他们输入密码和名称.什么是HTML代码?

html authorization

0
推荐指数
1
解决办法
161
查看次数

在Google App Engines中,如何在Python中显示已获取URL的页面的HTML源代码?

在Google App Engine上,我发现此代码正在获取网页的网址:

from google.appengine.api import urlfetch
url = "http://www.google.com/"
result = urlfetch.fetch(url)
if result.status_code == 200:
  doSomethingWithResult(result.content)
Run Code Online (Sandbox Code Playgroud)

这是用于确定该页面的HTML源代码的正确代码吗?结果变量是否包含http://www.google.com/的 HTML文件?如果是,我应该使用什么Python命令而不是 doSomethingWithResult(result.content)才能显示该HTML源代码?打印结果似乎不是正确的方法.

html python url google-app-engine fetch

0
推荐指数
1
解决办法
189
查看次数