7
我想下面的分割功能,這是我一直用它來使preg_split ..它有點混亂轉換,因爲該值會改變不時..PHP的分裂,使preg_split
current code:
$root_dir = 'www';
$current_dir = 'D:/Projects/job.com/www/www/path/source';
$array = split('www', 'D:/Projects/job.com/www/www/path/source', 2);
print_r($array);
output of the split function:
Array ([0] => D:/Projects/job.com/ [1] => /www/path/source)
爲什麼要使用`preg_split`? – lonesomeday 2011-01-19 12:34:42
是`split`只是一個使用`preg_split`的函數?爲什麼你不使用爆炸? – RobertPitt 2011-01-19 12:44:59