标签:xpl kong pos php control 判断 错误 str lod
php explode容易犯的错误
<pre>
$pos = strpos($v, ‘Controller‘);
if (is_numeric($pos)) {
$kongzhiqifege = explode(‘Controller‘, $v);
$kongzhiqi = $kongzhiqifege[0];
if (!empty($kongzhiqi)) {
$kongzhiqi = strtolower($kongzhiqi);
}
}
</pre>
一定要先判断下是否存在 然后进行分割
标签:xpl kong pos php control 判断 错误 str lod
原文地址:https://www.cnblogs.com/newmiracle/p/11875999.html