Jump to content

Getting Files.....


Jamesking56
 Share

Recommended Posts

you can use this function:

// show inside of a directoryfunction intofolder($directory) {	$show_file = '';	if ($handle = opendir($directory)) {		$show_file = 'Directory handle: $handle<br />'.					 'File:<br />';		while (false !== ($file = readdir($handle))) {			$show_file .= $file .'<br />';		}		closedir($handle);	}	return $show_file;}

Link to comment
Share on other sites

Glob takes a single argument which specifies the filename and path, and a second optional one specifying what sort of files to return. It accepts the wildcard character *, and a limited form of regular expressions.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...