0

I need to start a simple php session and make it last for one day, I tried this: session_start(['cookie_lifetime' => 86400,]); as the manual indicates, but adobe Dreamweaver says there is a syntax error in the code.

Any help?

Thanks in advance

1
  • I would like to know why I always get a votedown, what are the rules? why not vote down and explain why Commented Apr 26, 2017 at 2:31

1 Answer 1

2

You have extra comma in code

session_start(['cookie_lifetime' => 86400,]);

to

session_start(['cookie_lifetime' => 86400]);
Sign up to request clarification or add additional context in comments.

1 Comment

Yes, that's what I thought and tried, but still I got the same syntax error in dreamweaver

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.