?
Solved

What does @ mean?

Posted on 2009-05-07
8
Medium Priority
?
262 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 1200 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 800 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 1200 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

Video: Liquid Web Managed WordPress Comparisons

If you run run a WordPress, you understand the potential headaches you may face when updating your plugins and themes. Do you choose to update on the fly and risk taking down your site; or do you set up a staging, keep it in sync with your live site and use that to test updates?

Question has a verified solution.

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

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

777 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