How to detect files with same name in various directories?
<p>Suppose there are 2 directories on my server:</p>

<pre><code>/xyz/public_html/a/
/xyz/public_html/b/
</code></pre>

<p>And both of them consist of many files. How do i detect the files that are common to both the folders in terms of their <code>name</code> and <code>file_extension</code>. This program is to be implemented in PHP. Any suggestions?</p>
