Strict Standards php error

后端 未结 3 2007
甜味超标
甜味超标 2021-01-26 18:27

I have a small issue with my script.

I\'m getting Strict Standards: Only variables should be passed by reference in

if( $checkDNS && ($domain = e         


        
3条回答
  •  一个人的身影
    2021-01-26 19:02

    From the PHP manual:

    This array is passed by reference because it is modified by the function. This means you must pass it a real variable and not a function returning an array because only actual variables may be passed by reference.

    So you must use a variable in the end function:

    $domain = explode('@',$email, 2);
    if( $checkDNS && ($domain = end($domain)) )
    

提交回复
热议问题