strpos(string haystack, string needle, int [offset]);
注意的是 needle 只能是一个字元,中文字等就不适合了

解决方案 »

  1.   

    if(empty(strstr($fileele["dirname"],"\\images\\")))
    exit();
      

  2.   

    if (empty(strstr($HTTP_SERVER_VARS["HTTP_REFERER"]."",$HTTP_SERVER_VARS["PHP_SELF"]."")))

    Parse error: parse error, unexpected T_STRING, expecting T_VARIABLE or '$' in c:\program files\apache group\apache\htdocs\php1\so_website\alldownload.php on line 12
      

  3.   

    strstr 不行,因為它不能檢查一個字符串是否有另一字符串