Solved

What does @ mean?

Posted on 2009-05-07
8
245 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
 
LVL 36

Expert Comment

by:Loganathan Natarajan
ID: 24327708
it will hide the ERROR WARNINGS
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Consider the following scenario: You are working on a website and make something great - something that lets the server work with information submitted by your users. This could be anything, from a simple guestbook to a e-Money solution. But what…
Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
The viewer will learn how to dynamically set the form action using jQuery.
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 …

746 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now