MrFish Posted June 21, 2009 Report Share Posted June 21, 2009 In php you have to put create cookies before the html tags but could you create a file that makes cookies before the html tags and include it into you actual code somewhere? Link to comment Share on other sites More sharing options...
boen_robot Posted June 21, 2009 Report Share Posted June 21, 2009 (edited) Yes, but the file won't be able to actually make the cookies until it's executed. There's a difference between creating a file and executing it after all. And you can only execute the created file after the current PHP script is over. eval()-ing it isn't going to make any difference. Executing it from the command line (while possible) won't make a difference either, as the new file will need to return the cookie as an HTTP header, which can only happen upon an HTTP request from the user agent that would receive the cookie. Edited June 21, 2009 by boen_robot Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now