How to get a php script to print/work
<p>I have: </p>

<pre><code>function ListFiles($dir) {

    if($dh = opendir($dir)) {

        $files = Array();
        $inner_files = Array();

        while($file = readdir($dh)) {
            if($file != "." &amp;&amp; $file != ".." &amp;&amp; $file[0] != '.') {
                if(is_dir($dir . "/" . $file)) {
                    $inner_files = ListFiles($dir . "/" . $file);
                    if(is_array($inner_files)) $files = array_merge($files, 

$inner_files); 
                } else {
                    array_push($files, $dir . "/" . $file);
                }
            }
        }

        closedir($dh);
        return $files;
    }
}


foreach (ListFiles

('www.fromtheabsenceofagirlfriendcomesthis.net/sounds/folder1') as $key=&gt;

$file){
    echo $file ."&lt;br /&gt;";
}  
</code></pre>

<p>From somewheres on the web, &amp; when I test it (I eventually want to return a random file name into a href - so tips welcome) I get null. &amp; I try opening the php file via the browser, (null), &amp; I tried calling it from a "php" page: </p>

<pre><code>  &lt;!DOCTYPE HTML&gt;
    &lt;HTML&gt;
    &lt;HEAD&gt;
    &lt;/HEAD&gt;
    &lt;BODY&gt;

    &lt;script language="JavaScript" type="text/javascript"
    src="http://fromtheabsenceofagirlfriendcomesthis.net/sounds/randomfil

    e.php"
    &lt;script&gt;
    &lt;/BODY&gt;
    &lt;/HTML&gt;
</code></pre>

<p>But null. What's my problem?</p>
