Severity: Warning
Message: Wrong parameter count for strstr()
以下代码
$ext = strrev(strstr(strrev($file), ".", TRUE));
我应该怎么办?
更新
在$ext = strrev(strstr(strrev($file), ".", TRUE));
代替我都用这个。
$ext = strrev(substr(strrev($file)), 0 ,strpos(strrev($file), ":"));
仍然得到同样的错误substr
和strrev
这是一种奇怪的。它与版本问题有关吗?
'substr(strrev($ file))'对'substr'没有足够的参数。 – nickb
我应该怎么写? –
你只是想获得文件名的扩展名? – nickb