简体   繁体   中英

I don't understand why this redirect doesn't work

 if (lo_first == 'true' && $lo_first != '1') { 
header("Location: http://example.com/myOtherPage.php");
exit(); } 

I don't understand why this redirect doesn't work

Take a look at your if :

if (lo_first == 'true' && $lo_first != '1') {

Here you use both lo_first and $lo_first , which indicates that $lo_first is a variable from which the $ is forgotten at its first use. Fix:

if (lo_first == 'true' && $lo_first != '1') {

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM