Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function GetList($dir){
- global $hash;
- $folder = scandir($dir);
- foreach($folder as $file){
- if($file != '.' && $file != '..'){
- if(is_dir($dir.'/'.$file)) {
- } else {
- $hash = md5_file($dir . '/' . $file);
- $sql = "SELECT `Hash` FROM `mydb`.`filehash` WHERE `Dir`='".mysql_escape_string($dir."\\")."' AND `FName`='".mysql_escape_string
- ($file)."'";
- // print $sql."<br>";
- $result = mysql_query($sql);
- $result = mysql_result($result,0);
- print $hash."=".$result."<br>";
- }
- }
- }
- }
- print '<html>';
- $host="localhost";
- $user="MyDBuser";
- $pass="1"; //установленный вами пароль
- $db_name="myDB";
- $link=mysql_connect($host,$user,$pass);
- mysql_select_db($db_name,$link);
- GetList("Z:\Home\Localhost\www");
- print '</html>';
- mysql_close();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement