PHP header()函数跳转无效

| | Comments (1)



很多时候,学习PHP都来去php.net初次使用后一直发现用的很好,在自己调试的过程中,各种函数的运用,或者一些调试过程的小细节和以往的写法不同往往会出问题。

比如,今天header("Location: $url"),以往跳转总是可以的,今天却不动,只是输出结果。以往自己要确认检查,$url的值获取的是否正确,所以在前面加了echo $url;来调试用,结果就导致了header函数的无效。

赫赫,所以总结程序要写得越多越好,碰到问题了解决了,也就成了自己的知识。

如果有人来找的是 PHP header跳转的方法,请看php header 转发网址的两种方法,这篇文章中,小弟涉及一二。

1 Comments

你最近很忙啊

Leave a comment

Archives

Ads by google

Pages

Powered by Movable Type 4.24-en

About this Entry

This page contains a single entry by 单点日志 published on April 17, 2011 12:06 AM.

Google Doodle:默片时代的喜剧之王-查理·卓别林 122 周年诞辰 was the previous entry in this blog.

染色馒头等事件引申的道德滑坡 is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.