Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to hide the Session_start notice print

Posted on 2003-11-28
3
Medium Priority
?
416 Views
Last Modified: 2008-02-20
A notice is printed saying "Session already started" because I'm doing a session_start() even though I have sessions autostart=1 in the php.ini file.

I would still like to see other kind of notices, but how could I hide this particular one?
0
Comment
Question by:ecchymose
  • 2
3 Comments
 
LVL 3

Accepted Solution

by:
ashoooo earned 200 total points
ID: 9839222
Try @session_start()
0
 

Author Comment

by:ecchymose
ID: 9839257
Nice!  it works!

but what does the @ is doing exactly?
0
 
LVL 3

Expert Comment

by:ashoooo
ID: 9839391
It hides the warning. Its not a good practice, but you can use it if you are sure it wont mess up the rest of your page. :)

Thanks for the points
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this. Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it i…
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
The viewer will learn how to count occurrences of each item in an array.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question