0
我得到一個「無效參數」與此代碼錯誤。請幫我修復它。foreach不能使用glob - 錯誤:無效的參數
$sub1 = "sub1";
$sub2 = "sub2";
$td = "4";
foreach (glob("directory/".$sub1."/".$sub2."*.td".$td) as $filename) { //This is the line throwing the error
echo "$filename size " . filesize($filename) . "\n"; //This is right from php.net manual
}
謝謝!總是那麼愚蠢,我忘記了......我沒有爲每個變量添加斜線。 – GiantDuck
很高興幫助! – andrewsi