jagguy Posted January 26, 2007 Share Posted January 26, 2007 1)I am gettin some warnings I want to supress, eg I am going through a dir and deleting files and the file '.' and '..' comes up with warnings when trying to delete. What is @ and & in regards to error supression.2)Also when using include statement I sometime sget an error with header files as it thinks this echos to the screen and fails. When i get rid of includes statement it works fine. Can I suppress this statements like with 'warnings'? Quote Link to comment Share on other sites More sharing options...
spfoonnewb Posted January 26, 2007 Share Posted January 26, 2007 Huh?What does your include statement look like?Does the file exist?Codes would help Quote Link to comment Share on other sites More sharing options...
emehrkay Posted January 26, 2007 Share Posted January 26, 2007 just put the @ in front of a piece of code that would give you a warning. i wouldnt do it, but it is there for you to use Quote Link to comment Share on other sites More sharing options...
linuxdream Posted January 27, 2007 Share Posted January 27, 2007 Whenever I process directories I always test for . and .. and simply continue; past them. They will always generate errors so it's best get warned when you need to and prevent the ones you know will always give errors. Quote Link to comment Share on other sites More sharing options...
jagguy Posted January 27, 2007 Author Share Posted January 27, 2007 [quote author=spfoonnewb link=topic=124231.msg514443#msg514443 date=1169854815]Huh?What does your include statement look like?Does the file exist?Codes would help[/quote]i include thisinclude("dbconnect.php");-- the file below<?php error_reporting(E_ALL); // some basic sanity checks //connect to the db $link = mysql_connect("localhost", "jagguy_root", "")or die("Could not connect: " . mysql_error()); // select our database mysql_select_db("jagguy_formdata") or die(mysql_error());?>ps what does the & symbol do again? Quote Link to comment Share on other sites More sharing options...
Nameless12 Posted January 27, 2007 Share Posted January 27, 2007 You should never use the @ sign its best to avoid errors than silence them.Jagguy:: the & symbol is a bitwise operator. Quote Link to comment Share on other sites More sharing options...
linuxdream Posted January 27, 2007 Share Posted January 27, 2007 I think he means &$value usage. The & in this case means to pass a value by reference, not by value. Typically used in a functions declaration. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.