Stooney Posted November 19, 2007 Share Posted November 19, 2007 here's my code: $fileUrl = "http://www.phpfreaks.com/images/logo_main.jpg"; $AgetHeaders = @get_headers($fileUrl); if (preg_match("|200|", $AgetHeaders[0])) { echo "good"; } else { echo "bad"; } (i copied the code from a post on php.net) The script seems to completely stop at @get_headers. not a single line of anything is executed after it. any of you know why that would happen? ty in advance Quote Link to comment Share on other sites More sharing options...
darkfreaks Posted November 19, 2007 Share Posted November 19, 2007 @ will suppresss anything that comes after it im sure it would work if you just took it out completely. Quote Link to comment Share on other sites More sharing options...
Stooney Posted November 19, 2007 Author Share Posted November 19, 2007 the problem i run into when removing @ is Fatal error: Call to undefined function: get_headers() Quote Link to comment Share on other sites More sharing options...
rlindauer Posted November 19, 2007 Share Posted November 19, 2007 What version of PHP are you using? The problem is the function doesn't exist. Information about the @ operator -> http://php.net/operators.errorcontrol Quote Link to comment Share on other sites More sharing options...
teng84 Posted November 19, 2007 Share Posted November 19, 2007 your error says that you are calling to a function that doesn't exist get_headers i believe this function is php5 so lower than five wont recognize that predefined function Quote Link to comment Share on other sites More sharing options...
Stooney Posted November 19, 2007 Author Share Posted November 19, 2007 aight, found out i was running scripts as php4 instead of 5. I switched it all to php5, but now my post variables wont send. I read a few things about it happening with others, but couldnt really find a solution. Quote Link to comment Share on other sites More sharing options...
teng84 Posted November 19, 2007 Share Posted November 19, 2007 maybe post the piece of that code so we can diagnose it Quote Link to comment Share on other sites More sharing options...
toplay Posted November 19, 2007 Share Posted November 19, 2007 Add relevant excerpt of your code so members of this forum can help you better. Since you're now using PHP 5, make sure you're using $_POST and not the older deprecated $HTTP_POST_VARS. Quote Link to comment Share on other sites More sharing options...
Stooney Posted November 19, 2007 Author Share Posted November 19, 2007 ty for all of your help. I just had to change how I handled post with php5. got it all working now. 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.