在标题刷新时需要一些帮助...... [英] Need some help on header refresh...

查看:61
本文介绍了在标题刷新时需要一些帮助......的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Harlow ......我需要一些帮助......我实际上试图做一个页面

使用php ...该功能是从第3个接收某些参数

派对提供商...我需要在

某些验证后将我的页面重定向到另一个页面。当我使用网址进行测试时,这没关系...

验证部分工作正常......场景如下:


if情况a,回显abc


如果情况b,回显abc然后刷新到另一页。


问题是在第三方打电话给我之后页面刷新没有
工作...在做了一些修改后,它重定向到另一个页面但是

不会回显abc ...所以任何其他方式重定向页面? ??试过

输出缓冲区启动和刷新但仍然无法...... SOS ......


问候,

Justin

解决方案

Justin写道:


Harlow ...我需要一些帮助在这些...我真的试图做一个页面

使用PHP ...该功能是从第三个

派对提供商接收某些参数...而我

某些验证后需要将我的页面重定向到另一个页面。当我使用网址进行测试时,这没关系...

验证部分工作正常......场景如下:


if情况a,回显abc


如果情况b,回显abc然后刷新到另一页。


问题是在第三方打电话给我之后页面刷新没有
工作...在做了一些修改后,它重定向到另一个页面但是

不会回显abc ...所以任何其他方式重定向页面? ??试过

输出缓冲区启动和刷新但仍然无法...... SOS ......


问候,

Justin



您可以使用header()调用来重定向,但它与

echo()不兼容。在调用header()之前,你不能向浏览器发送任何输出。


但如果你重定向,你发送的任何输出都不会显示

无论如何 - 那么为什么还要发送呢?

-

==================

删除x来自我的电子邮件地址

Jerry Stuckle

JDS计算机培训公司
js ******* @ attglobal.net

==================


3月3日上午11:29,Jerry Stuckle< jstuck ... @ attglobal.netwrote:


Justin写道:


Harlow ...我需要一些帮助...我实际上试图做一个页面

使用php ...功能是从第三个
派对提供商那里接收某些参数......我需要在确定
之后将我的页面重定向到另一个页面。当我使用url进行测试时,这没关系...

验证部分工作正常......场景如下:


如果情况a,echo abc


如果情况b,echo abc然后刷新到另一个页面。


问题是在第三方调用我的页面之后刷新没有

work ...在做了一些修改后,它重定向到另一个页面,但

不会回显abc ...所以任何其他方式重定向页面???试过

输出缓冲区启动和刷新但仍然无法...... SOS ...


问候,

Justin



您可以使用header()调用来重定向,但它与

echo()不兼容。在调用header()之前,你不能向浏览器发送任何输出。


但如果你重定向,你发送的任何输出都不会显示

无论如何 - 那么为什么还要发送呢?


-

================ ==

删除x来自我的电子邮件地址

Jerry Stuckle

JDS计算机培训公司

jstuck ... @ attglobal.net

==================



er ...来自我的第三方提供商的要求是我有到

回复-1一旦从他们那里收到参数..所以我把echo -1。

有没有其他方式发送而不是回声?重定向部分是

我要添加的东西......它不在他们提供的API中......


Justin写道:


3月3日上午11点29分,Jerry Stuckle< jstuck ... @ attglobal.netwrote:


> Justin写道:


>> Harlow ...我需要一些帮助......我实际上试图用一个页面
使用php ...该功能是从第三方提供者接收某些参数...我需要在确定某些验证后将我的页面重定向到另一个页面。当我使用url进行测试时它没关系...
验证部分工作正常......场景如下:
如果情况a,如果情况b,则回显abc
,回显abc然后刷新到另一个页面。
问题是在第三方调用我的页面后刷新没有工作......在做了一些修改后,它重定向到另一个页面但是
不是echo abc ...所以任何其他方式重定向页面???试过
输出缓冲区启动和刷新但仍然无法...... SOS ...
问候,
Justin


你可以使用header()调用重定向,但它与
echo()不兼容。在调用header()之前,你不能向浏览器发送任何输出。

但如果你重定向,你发送的任何输出都不会显示
- 所以为什么麻烦发送它?

-
==================
删除x来自我的电子邮件地址
Jerry Stuckle
JDS计算机培训公司
jstuck ... @ attglobal.net
=============== ===



er ...来自我的第三方提供商的要求是我必须

回复-1一旦收到参数从他们..所以我把回声-1。

有没有其他方式发送而不是回声?重定向部分是

我要添加的东西...它不在他们提供的API中......



好的,你必须以-1回应。但是一旦你发送了任何输出,你就不能使用一个header()来调用




header()必须在发送标题之前调用到浏览器。并且

任何输出 - 甚至是空格 - 都会导致标题被发送。所以

您可以发送回复或进行重定向。但HTTP

协议(不是PHP)不会让你同时做这两件事。

-

======= ===========

删除x来自我的电子邮件地址

Jerry Stuckle

JDS计算机培训公司
js ******* @ attglobal.net

==================


Harlow... i need some help on these... im actually trying to do a page
using php... the function is to receive certain parameters from a 3rd
party provider... and i need to redirect my page to another page after
certain validation. it''s ok when i use the url to do the testing...
the validation part works fine... scenario as below:

if situation a, echo abc

if situation b, echo abc then refresh to another page.

the problem is after the 3rd party call my page the refresh doesnt
work... after doing some amendments, it redirects to another page but
doesnt echo abc... so any other way to redirect the page??? tried
output buffer start and flush but still couldn.... SOS...

Regards,
Justin

解决方案

Justin wrote:

Harlow... i need some help on these... im actually trying to do a page
using php... the function is to receive certain parameters from a 3rd
party provider... and i need to redirect my page to another page after
certain validation. it''s ok when i use the url to do the testing...
the validation part works fine... scenario as below:

if situation a, echo abc

if situation b, echo abc then refresh to another page.

the problem is after the 3rd party call my page the refresh doesnt
work... after doing some amendments, it redirects to another page but
doesnt echo abc... so any other way to redirect the page??? tried
output buffer start and flush but still couldn.... SOS...

Regards,
Justin

You can use header() calls to redirect, but it is incompatible with
echo(). You can''t send ANY output to the browser before a header() call.

But if you''re redirecting, any output you send would not be displayed
anyway - so why bother sending it?
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================


On Mar 3, 11:29 am, Jerry Stuckle <jstuck...@attglobal.netwrote:

Justin wrote:

Harlow... i need some help on these... im actually trying to do a page
using php... the function is to receive certain parameters from a 3rd
party provider... and i need to redirect my page to another page after
certain validation. it''s ok when i use the url to do the testing...
the validation part works fine... scenario as below:

if situation a, echo abc

if situation b, echo abc then refresh to another page.

the problem is after the 3rd party call my page the refresh doesnt
work... after doing some amendments, it redirects to another page but
doesnt echo abc... so any other way to redirect the page??? tried
output buffer start and flush but still couldn.... SOS...

Regards,
Justin


You can use header() calls to redirect, but it is incompatible with
echo(). You can''t send ANY output to the browser before a header() call.

But if you''re redirecting, any output you send would not be displayed
anyway - so why bother sending it?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attglobal.net
==================

er... the requirement from my 3rd party provider is that i have to
reply -1 once receive the parameters from them.. so i put echo -1. is
there any other way to send instead of echo? the redirecting part is
something i wan to add on... it''s not in the API they provided...


Justin wrote:

On Mar 3, 11:29 am, Jerry Stuckle <jstuck...@attglobal.netwrote:

>Justin wrote:

>>Harlow... i need some help on these... im actually trying to do a page
using php... the function is to receive certain parameters from a 3rd
party provider... and i need to redirect my page to another page after
certain validation. it''s ok when i use the url to do the testing...
the validation part works fine... scenario as below:
if situation a, echo abc
if situation b, echo abc then refresh to another page.
the problem is after the 3rd party call my page the refresh doesnt
work... after doing some amendments, it redirects to another page but
doesnt echo abc... so any other way to redirect the page??? tried
output buffer start and flush but still couldn.... SOS...
Regards,
Justin

You can use header() calls to redirect, but it is incompatible with
echo(). You can''t send ANY output to the browser before a header() call.

But if you''re redirecting, any output you send would not be displayed
anyway - so why bother sending it?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attglobal.net
==================


er... the requirement from my 3rd party provider is that i have to
reply -1 once receive the parameters from them.. so i put echo -1. is
there any other way to send instead of echo? the redirecting part is
something i wan to add on... it''s not in the API they provided...

OK, you have to respond with a -1. But once you send ANY output, you
can''t use a header() call.

header() must be called before the headers are sent to the browser. And
any output - even white space - will cause the headers to be sent. So
you can either send a response or do the redirect. But the HTTP
protocol (not PHP) won''t let you do both.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================


这篇关于在标题刷新时需要一些帮助......的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆