Display Files in the folder using PHP

mqlsamp6

New Member
I have a issue in displaying files in the folder using PHP, The code that used to display is\[code\]<?php$dir="public_html/Uploads"; // Directory where files are storedif ($dir_list = opendir($dir)){while(($filename = readdir($dir_list)) != false){?><p><a href="http://stackoverflow.com/questions/10551135/<?php echo $filename; ?>"><?php echo $filename;?></a></p><?php}closedir($dir_list);}?>\[/code\]this code is work fine in the local server where it is a wamp server and it list all the files in the folder.But my problem is where it gives issue when i upload it to the hostgator server, it give me a 500 error.
 
Back
Top