QuadVods Posted May 21, 2006 Author Share Posted May 21, 2006 [!--quoteo(post=375856:date=May 21 2006, 08:07 PM:name=toplay)--][div class=\'quotetop\']QUOTE(toplay @ May 21 2006, 08:07 PM) [snapback]375856[/snapback][/div][div class=\'quotemain\'][!--quotec--]We forgot to specify the full path to the file on the is_file() function. The readdir() doesn't return a pull path and the filename, but rather just the filename.if ((is_file($dir . $file)) && ($file != '.') && ($file != '..')) {$count++;}Please try that and get back to us.[/quote]Parse error:.... Quote Link to comment https://forums.phpfreaks.com/topic/10128-counting-files-in-a-directory/page/2/#findComment-37772 Share on other sites More sharing options...
toplay Posted May 21, 2006 Share Posted May 21, 2006 [!--quoteo(post=375857:date=May 21 2006, 12:13 PM:name=QuadVods)--][div class=\'quotetop\']QUOTE(QuadVods @ May 21 2006, 12:13 PM) [snapback]375857[/snapback][/div][div class=\'quotemain\'][!--quotec--]Parse error:....[/quote]There's no parse error in that code. It's somewhere else.Parse Errors are caused by human error. Check on the line of the error, but usually one to many lines before it, for missing closing tags (i.e. ", ), }, ;, etc.).Here's a list of what those PHP tokens seen in error messages mean:[a href=\"http://us2.php.net/manual/en/tokens.php#tokens\" target=\"_blank\"]http://us2.php.net/manual/en/tokens.php#tokens[/a] Quote Link to comment https://forums.phpfreaks.com/topic/10128-counting-files-in-a-directory/page/2/#findComment-37774 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.