Solved

What does @ mean?

Posted on 2009-05-07
8
249 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
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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

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