Some dought's .......................

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
myharshdesigner
Forum Commoner
Posts: 43
Joined: Sat Apr 21, 2007 8:23 pm

Some dought's .......................

Post by myharshdesigner »

what is the difference between :-

Code: Select all

@session_start();
and

Code: Select all

session_start();
Thanks
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

The @ will supress any error messages a function might spit out. Generally you should avoid it's usage, unless it is very much neccesary.
myharshdesigner
Forum Commoner
Posts: 43
Joined: Sat Apr 21, 2007 8:23 pm

Post by myharshdesigner »

Jcart wrote:The @ will supress any error messages a function might spit out. Generally you should avoid it's usage, unless it is very much neccesary.
THANKS[/s]
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

Jcart wrote:Generally you should avoid it's usage, unless it is very much neccesary.
There are no situations where it's necessary. On a development or staging server you should allow all errors to be displayed, on a production server you disable all errors from being displayed. Neither calls for the @ operator.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

onion2k wrote:
Jcart wrote:Generally you should avoid it's usage, unless it is very much neccesary.
There are no situations where it's necessary. On a development or staging server you should allow all errors to be displayed, on a production server you disable all errors from being displayed. Neither calls for the @ operator.
erhmm.. yea.
Post Reply