adam291086 Posted November 30, 2007 Share Posted November 30, 2007 I have some code. I am write in saying that if $extention doesn't = csv then unlink the file? if (!$extention == 'csv') { unlink($destination .$file_type); echo "invalid file"; } Quote Link to comment Share on other sites More sharing options...
revraz Posted November 30, 2007 Share Posted November 30, 2007 if ($extention != 'csv') Quote Link to comment Share on other sites More sharing options...
obsidian Posted November 30, 2007 Share Posted November 30, 2007 I have some code. I am write in saying that if $extention doesn't = csv then unlink the file? if (!$extention == 'csv') { unlink($destination .$file_type); echo "invalid file"; } "==" is actually your equality comparison operator, so you are telling it to delete the file if the extension IS 'csv'. Look at your comparison operators in the manual for more detail. Quote Link to comment Share on other sites More sharing options...
adam291086 Posted November 30, 2007 Author Share Posted November 30, 2007 ah i see thank. I am rather tired so silly mistakes 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.