Warning: strstr () [functionstrstr]: Emptydelimiter. it's very strange. Is there a problem with a certain parameter in the strstr function of php?
Warning: strstr () [function. strstr]: Empty delimiter. it's very strange. Is there a problem with a certain parameter in the strstr function of php ?, So I wrote a test example:
-
- $ Text = "asdfghjklqwertyuiopzxcvbnm ";
- // $ Key = "g ";
- // According to the php error prompt Empty delimiter, it is determined that the value of $ text should not have a problem, so the key value is intentionally commented
- If (strstr ($ text, $ key )){
- Echo "found it ";
- } Else {
- Echo "not found ";
- }
- ?>
Strstr () does not report an error, so it is thought that the $ key value may be an empty string "". let's just try it. when strstr ($ text, "") is displayed, an error Warning is prompted: strstr () [function. strstr]: Empty delimiter