I'm new to php. I know very little.

I'm just looking for some simple code that will take the contents of a directory, say /junk and print them onto a page for me, like junk.htm, so my friends have easy access to files I post.

feel free to speak to me like a child, because i suck at computers.

Jake

    You may want to consider a solution outside of PHP, i.e. configure (or get your web server administrator to configure) the web server such that directory listing is permitted on the directory (or directories) you require.

    With PHP the solution will involve using the directory functions.

      laserlight wrote:

      You may want to consider a solution outside of PHP, i.e. configure (or get your web server administrator to configure) the web server such that directory listing is permitted on the directory (or directories) you require.

      With PHP the solution will involve using the directory functions.

      hi

      the server has directories, but i guess im really just looking for a directory that opens up in the rest of the page and follows the same theme, i.e., keep color and fonts.

      my page is located at www.roar-usa.org/stillbeating

      when someone clicks /junk, i want the contents printed there.

      Thanks

        Read what the PHP Manual has to say on the directory functions. You will probably use something along these lines:

        if ($dir_handle = opendir($dir_path)) {
        	while (($entry = readdir($dir_handle)) !== false) {
        		echo $entry . "<br />\n";
        	}
        	closedir($dir_handle);
        } else {
        	echo "Directory is empty<br />\n";
        }
          Write a Reply...