Hi, I just bought a site and I can't get a number of pages to open a sub directory within the page using opendir. I am not certain they wrked properly before I bought the site, however, the only thing I have changed is the paths to absolute from relative (but even on changing them back it still doesn't work) <? $path = "http://www.profilecoder.com/graphics/cursors/animal"; //using the opendir function $dir_handle = @opendir($path) or die("Unable to open $path"); echo "<table width=\"100%\" align=\"center\"> <tr> <td style=\"padding-right: 10px;\"><div class=\"text\"><div align=\"center\">Simply copy and paste the codes into the 'about me' section of your profile!<br><br>Hover over the code box for a preview of the cursor.<br></div> <br>"; //running the while loop while ($file = readdir($dir_handle)) { if($file!="." && $file!="..") echo "<table width=\"88%\" align=\"center\"> <tr> <td class=\"bluebox\"> <table width=\"325\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\"> <tr> <td style=\"padding-right: 10px;\" align=\"center\"><div class=\"orange\"> <textarea name=\"textarea2\" cols=50 rows=2 class=\"bginput\" style=\"cursor:url(http://www.profilecoder.com/graphics/cursors/animal/$file);\" onclick=\"this.focus();this.select()\"><style type="text/css">body {cursor: url(public_html/graphics/cursors/games/$file); }</style><a href="http://www.profilecoder.com/">Cursor By ProfileCoder</a> </textarea> </div></td> </tr> </table></td> </tr> </table> <br />"; } echo " </td> </tr> </table>"; closedir($dir_handle); ?> This is one of the pages in question http://www.profilecoder.com/graphics/cursors/animals-cursors.php I would appreciate it if anyone can help on this. Thanks, Jez.
$path should be directory path on your server. For example: /home/username/public_html/graphics/cursors/animal