atitthaker Posted August 26, 2006 Share Posted August 26, 2006 I am having problem regarding headers_list in HTTP functions...This is my code below:<?phpob_start();setcookie("test1","cookie value");header("x_sample_test:foo");header("content-type:text/plain");print(var_dump(headers_list()));print(var_dump(headers_sent()));?>So as I am sending three header items(rwo cookies & one header) I am getting a blank array when asking for the headers_list().My function headers_sent() function is returning true.So that "true" is bcoz of headers I sent or the headers sent by default?Plz Help. Quote Link to comment https://forums.phpfreaks.com/topic/18690-headers_list-function-problem/ Share on other sites More sharing options...
radar Posted August 26, 2006 Share Posted August 26, 2006 In order to really help you should post the code for your headers_list function and your headers_sent function... Give a little insight into what it is the code is doing and what it is not doing... Quote Link to comment https://forums.phpfreaks.com/topic/18690-headers_list-function-problem/#findComment-80574 Share on other sites More sharing options...
atitthaker Posted August 26, 2006 Author Share Posted August 26, 2006 They are built in functions, not created by me. You can find them in PHP manual under HTTP function. Quote Link to comment https://forums.phpfreaks.com/topic/18690-headers_list-function-problem/#findComment-80615 Share on other sites More sharing options...
radar Posted August 26, 2006 Share Posted August 26, 2006 ahh see ive never used those -- thought you had written them.. on this one i'll have to step aside and let someone else who's used the functions step in and help.. sorry i was of no use to you.. Quote Link to comment https://forums.phpfreaks.com/topic/18690-headers_list-function-problem/#findComment-80619 Share on other sites More sharing options...
Zane Posted August 26, 2006 Share Posted August 26, 2006 var_dump is a print statement in itself...you can't print a print object if that makes senseI'm surprised you haven't mentioned an error or somethingbut anyway...var_dump(headers_list()); should be sufficientas well asvar_dump(headers_sent()); Quote Link to comment https://forums.phpfreaks.com/topic/18690-headers_list-function-problem/#findComment-80634 Share on other sites More sharing options...
atitthaker Posted August 28, 2006 Author Share Posted August 28, 2006 I did not give any error message bcoz It was not giving me any. One more thing I wanna say is that it is not giving output with or without print statement. I dont understand what's going on there with the script. Quote Link to comment https://forums.phpfreaks.com/topic/18690-headers_list-function-problem/#findComment-81452 Share on other sites More sharing options...
shoz Posted August 28, 2006 Share Posted August 28, 2006 Try using a newer version.http://bugs.php.net/bug.php?id=29683 Quote Link to comment https://forums.phpfreaks.com/topic/18690-headers_list-function-problem/#findComment-81458 Share on other sites More sharing options...
atitthaker Posted August 28, 2006 Author Share Posted August 28, 2006 Thank You Quote Link to comment https://forums.phpfreaks.com/topic/18690-headers_list-function-problem/#findComment-81533 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.