简体   繁体   English

PHP-当我需要时,它给了我一个浏览错误

[英]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: 所以你有这个:

  1. browser requests swag.php 浏览器请求swag.php

  2. swag.php sends Location header telling the browser to load teste.php . swag.php发送Location标头,告诉浏览器加载teste.php

  3. teste.php loads swag.php , which sends the Location header telling the browser to load teste.php teste.php加载swag.php ,它发送Location标头,告诉浏览器加载teste.php

  4. 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.

相关问题 当我尝试安装作曲家要求riazxrazor / payumoney时,出现错误 - when i try to install composer require riazxrazor/payumoney it gives me an error 当我尝试要求“作曲家需要 unisharp/laravel-ckeditor”时,它给了我这个。 是什么原因? - When i try to require “ composer require unisharp/laravel-ckeditor”, it gives me this. What is the reason? 在开发服务器上设置时,cake php给我错误 - cake php gives me error when setting up on development server 我正在尝试使用 php 连接到 mysql 数据库,但它给了我一个错误 - I'm trying to connect to mysql database with php, but it gives me an error 当我在PHP中包含文件时,它给我一个空白屏幕? - When I include files in PHP, it gives me a blank screen? 我有一个PHP代码,在执行时会给出错误。 谁能指出我的错误。 - I have a PHP code which gives and error when executing. Can anyone point me out the error please. 当我在codeigniter中使用count函数时,它给我错误 - When I use count function in my codeigniter it gives me error 当我尝试创建表时,SQL或mariadb给我此错误 - SQL or mariadb gives me this error when I try to create a table PHP邮件脚本给我语法错误 - PHP mail script gives me syntax error 为什么在网站特定页面上出现错误:浏览到index1.php文件时内部服务器错误? - Why i'm getting error on the web site specific page: Internal Server Error when browsing to index1.php file ?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM