Php determines whether a variable contains (including) a specific string. Problem: phpbench variables include: how does one make the program Judge liehuo_net123456789.exe when there is an exe in $ liehuo_net?
Problem:
Php determines whether a variable contains (including) a specific string
If there is a variable
$ Liehuo_net = "123456789.exe"
How to let the program make the following judgment:
If $ liehuo_net contains "exe", "EXE" is output"
If no "exe" exists, check whether "123" exists"
If "123" is available, "one, two, three" is output"
If no, the output is "none"
Answer:
$ Liehuo_net = "123456789.exe ";
If (strstr ($ liehuo_net, "exe "))
{
Echo "exe \ n ";
}
Elseif (strstr ($ a, "123 "))
{
Echo "one, two, three \ n ";
}
Else
{
Echo "none ";
}
?>
Php determines whether the variable contains (including) a specific string. if there is a variable named $liehuo_net%123456789.exe, how can the program make the following judgment: if $ liehuo_net contains exe, the output EXE is not...