There are two problems when judging the file type. The code is as follows:
if ($type!== ' gif ' | | $type!== ' JPEG ' | | $type!== ' png ') {
echo "Format error";
}
else {
Echo $type;
}
Question 1: Not equal, is with!==?
Issue 2: | | It doesn't work,
Table 7-3. Logical Operators (table 7-3 logical operators)
Example name result?/font>
$a and $b and true of both $a and $b is true.? /FONT>
$a or $b or?/font> true if either $a or $b is true.? /FONT>
$a xor $b or?/font> true if either $a Or
Php array operators$ A + $ B join $ a and $ B.$ A = $ B is equal. If $ a and $ B have the same key/value pair, the value is TRUE.$ A ===$ B. TRUE if $ a and $ B have the same key/value pairs and the order and type are the same.$! = $ B: TRUE if $ a
PHP logic operator ...
There are two problems when judging the file type. The code is as follows:
if ($type!== ' gif ' | | $type!== ' JPEG ' | | $type!== ' png ') {
echo "Format error";
}
else {
Echo $type;
}
Question 1: Not equal, is with!==?
Issue
PHP has a lot to learn, here we mainly introduce the PHP logical operators, including the introduction of bit operators, comparison operators and so on. The bitwise operator allows you to set the bits specified in the integer number. If both the
Logical operators are typically used for Boolean operations, typically used in conjunction with relational operators, with three logical operators: logical AND (and), logical or (or), logical non (not).1. Logic and (and):&&var box = (5 > 4) && (4 > 3
Array operator (+), string operator (.), logical operators (amp; AND | ORXOR) have a need for friends can refer to the reference. php array operator $ a + $ B Union $ a and $ B Union. nbs... array operator (+), string operator (.) AND logical
For more information about array operators (+), string operators (.), AND logical operators (& AND | or xor), see.
Php array Operators
$ A + $ B join $ a and $ B.$ A = $ B is equal. If $ a and $ B have the same key/value pair, the value is TRUE.$ A =
JS in the development of logical operators can be regarded as a more common operator, there are mainly three: logic and &&, logic or | | And logic is not.
When && and | | When a connection statement is made, the statements on both sides are
So query the introduction of JS:
1. Logic or operator | | :
When operator | | Of the two operands is a Boolean value that performs a Boolean or operation on both counts.
It first calculates the first operand, and if the value of the expression
Compassion Ji Shan Learning, technology is willing to learn. Good-hearted quick to build much better, walnuts after the cool. I am here to write the experience, willing to see the text to inspire.
~= This is not equal to the number, C
-------------------------------------------Split Line-------------------------------------------
Database in-depth learning note-sql execution engine
Here are a few questions to start today's discussion:
1, what is the SQL engine.
2, what is SQL
1. native semantics of logical operators(1) Operands have only two values (True and False)(2) Logical expression can determine the final value without fully calculating(3) The final result can only be true or false"Programming Experiment" logical
9.2.3 El expression Operator
There are many operators in the El expression that can help complete various required operations. In the previous example, "and" [] "are two of them. Table 9.1 is used to demonstrate all operators and their respective
An operator is a symbol that tells the compiler to execute specific arithmetic or logical operations. It usually forms an expression together with the operands. we often see that it participates in mathematical or logical operations. PHP also
Boolean logical operators-general Linux technology-Linux programming and kernel information. For more information, see the following section. The number of boolean operators can only be boolean. The logical operation results are also Boolean (see
In the middle of December, Winter was a wonderful season, and the cold air forced people to live in an easy and comfortable environment. Winter will give a quiet and peaceful atmosphere, let people immersed in it, as if an old stage of the end, but
C # Language Reference
Directory
1. Introduction 1
1.1 Hello, world 1
1.2 type 2
1.2.1 predefined Type 3
1.2.2 conversion 5
1.2.3 array type 6
1.2.4 type system consistency 7
1.3 variables and parameters 8
1.4 Automatic Memory Management 11
1.5
CMM is a subset of C, reserved words only the followingIf else while read write int realThe special symbol has the following several+-*/= (); { } [ ] /* */Identifier: A string consisting of numbers, letters, or underscores, and cannot make a
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.