kobayashi_one Posted December 22, 2006 Share Posted December 22, 2006 Hi,I want to make a site where you can add flash applets. For this I need to simple codes, but I'm a PHP newbie, so I need some help. 1: I need a code producing a link list of all files in a directory on my server.2: I need a code that makes a form where you can enter the flash applet url, flash applet name, a applet catergory (example: Movies), and where you can add a link to the creator of the applet. When you submit this form, a website should be created with the applet in the specific category/directory. I don't know how to make these codes.. has someone got the codes I need? Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted December 22, 2006 Share Posted December 22, 2006 In this forum we help you with problems in code you've written. We don't write the code for you. If you want someone to write the code, please post in the Freelancers area.Ken Quote Link to comment Share on other sites More sharing options...
kobayashi_one Posted December 22, 2006 Author Share Posted December 22, 2006 ok, sorry..will do.. Quote Link to comment Share on other sites More sharing options...
scotmcc Posted January 10, 2007 Share Posted January 10, 2007 Hey bud, try this code for listing the files in your directory. Hope it works for you. I put some comments in to help you sort out what is happening. You should just be able to copy and paste this code into your web page.Scot McConnaughay <?php // current directory $root = "." ; // set mydir as the current directory $mydir = opendir($root); // loop until the directory is empty while(false !== ($file = readdir($mydir))){ // put each file into an array if(!is_dir($file)){ $fileList[] = $file; } } closedir($mydir); natsort($fileList); // set up the variable for displaying the list $display = "data="; // seperate each file in the list with a '#' sign foreach($fileList as $file){ $display .= urlencode($file)."#"; } // output the resulting list. echo $display; ?> Quote Link to comment Share on other sites More sharing options...
kobayashi_one Posted February 16, 2007 Author Share Posted February 16, 2007 thank you very much, I owe you one! :D Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.