Jump to content

[SOLVED] doesn't ==


adam291086

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/79558-solved-doesnt/#findComment-402922
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.