PhpWarning: strstr () [function. strstr]: Emptydelimiter_PHP tutorial

Source: Internet
Author: User
PhpWarning: strstr () [function. strstr]: Emptydelimiter. When using the strstr function in php today, the following error message is displayed: Warning: strstr () [function. strstr]: Emptydelimiter. later, the solution is found repeatedly. if you need it, you can refer to it. Wa prompts Warning: strstr () [function. strstr]: Empty delimiter is incorrect. later, the solution is found repeatedly. if you need it, refer to it.

Warning: strstr () [function. strstr]: Empty delimiter

Strange: Is there a problem with a parameter in strstr of the php function?

So I wrote a test example.

The code is as follows:

$ 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 return an error. Therefore, the $ key value may be an empty string "". just try again.

Sure enough, when strstr ($ text, "") is displayed, the error Warning: strstr () [function. strstr]: Empty delimiter is prompted.

Failed () [function. strstr]: Empty delimiter is incorrect. later, the solution is found repeatedly. if you need it, you can refer to it. Wa...

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.