Solved

What does @ mean?

Posted on 2009-05-07
8
252 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
Industry Leaders: 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 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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

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.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

730 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