How to search for a filename in Php??
Even if i put a substring of a file,it display the full file name?Is there a direct function in PHP?

If you are searching for speciffic file you can check if it exists with file_exists($filename)..
readdir can read and return all files in some folder so you can grabthem all and check each of them..

foreach (glob("somefolder/*/*") as $filename) {
    //code for want you want to do with the results
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.