我收到此代码的“无效参数”错误。请帮我修复它。
$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
}