|
|
|
|
|
Saturday, 01 January 2011 03:46 |
// i think everybody(Beginners) want to know how it make.
function RandomFile($folder='', $extensions='.*'){
// fix path:
$folder = trim($folder);
$folder = ($folder == '') ? './' : $folder;
// check folder:
if (!is_dir($folder)){ die('invalid folder given!'); }
// create files array
$files = array();
// open directory
if ($dir = @opendir($folder)){
// go trough all files:
while($file = readdir($dir)){
if (!preg_match('/^\.+$/', $file) and
preg_match('/\.('.$extensions.')$/', $file)){
// feed the array:
$files[] = $file;
}
}
// close directory
closedir($dir);
}
else {
die('Could not open the folder "'.$folder.'"');
}
if (count($files) == 0){
die('No files where found :-(');
}
// seed random function:
mt_srand((double)microtime()*1000000);
Barbie Oyunları
// get an random index:
$rand = mt_rand(0, count($files)-1);
// check again:
if (!isset($files[$rand])){
die('Array index was not found! very strange!');
}
// return the random file:
return $folder . $files[$rand];
}
 Read more: |
|
|
Thursday, 02 December 2010 18:40 |
|
To promote a more consistent user experience, Mac apps submitted to the App Store must write files in the appropriate location. This avoids users being confused when applications store data in unexpected areas of the file system (e.g., storing databases in the user's Documents folder or storing files in the user's Library folder that are not recognizably associated with your application).
Learn more about file system usage 
Read more: |
|
Tuesday, 16 November 2010 03:00 |
 | About Big Mean Folder Machine
An easy to use file/folder management utility. It can split files into folder hierarchies or merge them into a single folder. With a familiar assistant-styled interface, The Big Mean Folder Machine is an essential tool for anyone who works with large file collections, including digital photographers, content creation, post-production, system administrators, and other creative professionals. |
Read more: |
|
|
|
|
|
|
Page 1 of 3 |