سلام
پسوند فایل رو بدون . وارد کنید
کد PHP:
<?php
//**************************************************************
$i=0;
//**************************************************************
//find matching string and save into array
if ( !empty($_POST['path']) && !empty($_POST['nam']) && !empty($_POST['ext']) ){
$it = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($_POST['path']));
$_POST['ext'] = '.'.$_POST['ext'];
$allowed = array($_POST['nam']);
foreach($it as $file) {
if($file->getFilename() == $_POST['nam'].$_POST['ext']){
$i++;
$pwd = $file;
}
}
//**************************************************************
$info = new SplFileInfo($pwd);
echo $info->getRealPath();
}
?>
<html>
<head>
<head>
<body>
<form action="" method="POST">
Name : <input type="text" name="nam"> <br/>
EXT :   <input type="text" name="ext"> <br/>
Path :   <input type="text" name="path"> <br/><br/>
<input type="Submit" value="Search">
</form>
</body>
</html>