Solved

What does @ mean?

Posted on 2009-05-07
8
258 Views
Last Modified: 2012-05-06
trying to use session_destroy() but it only works if I put @ in front of it.  What does the @ mean?
0
Comment
Question by:rbudj
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 17

Accepted Solution

by:
nplib earned 300 total points
ID: 24327588
suppress error messages.

so my guess it's not working, its just not reporting an error.
0
 
LVL 28

Assisted Solution

by:gamebits
gamebits earned 200 total points
ID: 24327601
@ will hide the error if any (will not display it on the page), don't understand why it will make the function work or not though.
0
 
LVL 4

Expert Comment

by:bljak
ID: 24327613
Actually, putting @ in front of function only suppresses any error messages if some would occur.
0
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
LVL 36

Expert Comment

by:Loganathan Natarajan
ID: 24327708
it will hide the ERROR WARNINGS
0
 
LVL 7

Expert Comment

by:ycTIN
ID: 24328096
@ in PHP is Error Control Operators

before PHP 5 , this is useful for exceptions handling function
 PHP 5 provided the try... catch

Detail :
http://www.php.net/manual/en/language.operators.errorcontrol.php
0
 
LVL 16

Author Comment

by:rbudj
ID: 24328282
ah,.. ok... i did not actually TEST it to make sure it was working.  No error and I assumed it was working.... basically what I am trying to do is session_destroy() but I got this error:

Warning: session_destroy() [function.session-destroy]: Trying to destroy uninitialized session in /home/advanc8/public_html/chpcomputers/admin/index.php on line 2

I read somewhere else to put the @ in front of session_destroy() but obviously that does not fix the problem.  Ideas?
0
 
LVL 17

Assisted Solution

by:nplib
nplib earned 300 total points
ID: 24328296
you need to add
session_start(); before session_destroy();
0
 
LVL 16

Author Closing Comment

by:rbudj
ID: 31579074
looks like a couple of you answered at the same time so i split points, and nplib solved my problem which should actually been a different question but i assigned points accordingly.  Thanks for the help!
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

691 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