php symbol
- Started
- Last post
- 7 Responses
- dehryll
i trying to decipher a php upload script and i don't understand the use of the "@" in the following statement. any help would be great.
...
}else{
@copy($file, "$absolute_path/$file_name")
}
...
- unfittoprint0
it comes before certain functions like those who deal who mysql queries. But to some some, I think it's optional...
- davetufts0
'@' before ANY command suppresses PHP's built-in error messaging. It's good if you want to handle errors on your own (since PHP's error messages might be confusing)...
if (!@mysql_query('select * from table') {
print("Please check back soon, we are having some problems.");
}
- dehryll0
does it do anything or is it a naming convention?
- davetufts0
Yes, it does something - like I just said:
@' before ANY command suppresses PHP's built-in error messaging.
- dehryll0
i sent my reply at the same time as your last post, so i didn't have a chance to read it.
thanks for the help.
- davetufts0
oh...sorry...
go red sox
- kpl0
go mariners.