[英]Php - When I require, it gives me a browsing error
I have an input in a html file, wich as its form action on swag.php 我在html文件中有一个输入,这是对swag.php的表单操作
<?php
header ('Location: ./teste.php');
$varr = $_POST['amount1'] ;
?>
I have teste.php 我有teste.php
<?php
require 'swag.php';
echo $var2;
?>
And then the input: 然后输入:
<form action="./post_swag/swag.php" method="post">
<input name="amount1" type="text" size="12" maxlength="4" />
<input type="submit">
</form>
When I insert the input's value, it gives me a browsig error, in teste.php, saying that it can't redirect me to the page because firefox detected that the server is rederecting a request to this adress for that the process is never concluded. 当我插入输入值时,它在teste.php中给了我一个browsig错误,说它无法将我重定向到页面,因为firefox检测到服务器正在重新请求对此地址的请求,因为该过程从未结束。 And then it says that might be disabled cookies... What should I do?
然后它说可能是禁用的cookie ...我该怎么办?
The Location
header tells the browser to stop what it's doing and load something else instead. Location
标头告诉浏览器停止正在执行的操作并加载其他内容。 So you have this: 所以你有这个:
browser requests swag.php
浏览器请求
swag.php
swag.php
sends Location
header telling the browser to load teste.php
. swag.php
发送Location
标头,告诉浏览器加载teste.php
。
teste.php
loads swag.php
, which sends the Location
header telling the browser to load teste.php
teste.php
加载swag.php
,它发送Location
标头,告诉浏览器加载teste.php
Repeat step 3 ad infinitum . 无限重复重复步骤3。
Firefox is detecting this infinite loop of redirects and says "I can't do that". Firefox正在检测到重定向的无限循环,并说“我做不到”。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.