i habe updated today my wordpress installation.
And everything works fine, but only the catecory pages.
Get errot tha in the index.php of my theme file, invalid argument foreach.
$jsFiles =开发者_Python百科 glob('*.js');
foreach($jsFiles as $jsFile)....
so he cant find the js files... or what? All other pages works fine - tags, pages, posts... i cant explain it :(
It means that what you supplied to the foreach construct is not an array. You can do something like this to see if the value is an array before you try to foreach over it:
if (is_array($jsFiles)) {
foreach($jsFiles as $jsFiles) // ....
} else {
// $jsFiles is not an array
}
Yup looks likes it can't find the files. Maybe changing to the directory where the files are located might help
精彩评论