On 4/10/2007 1:13 PM, "Tijnema !" <tijnema@xxxxxxxxx> wrote: > http://www.php.net/manual/en/function.scandir.php > >> >> 2 - List/ display the contents on the same Web-page > > http://www.php.net/manual/en/function.file-get-contents.php WOW COOL - That was quick - thanks Tijnema & Brad! >From here: http://us.php.net/manual/en/function.scandir.php I created a folder on a site called 'test' - inside that I created a folder called 'tmp' and put a few small files in there - test1.php and test1.pdf - inside the 'test' folder - I put a page with this code in it: -------START------------------ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>Untitled Document</title> </head> <body> <?php $dir = '/tmp'; $files1 = scandir($dir); $files2 = scandir($dir, 1); print_r($files1); print_r($files2); ?> </body> </html> ------- END ---------------- I believe I'm using php 5.xx and other simple php code tests works ok... What did I do wrong? * It returned this: Array ( [0] => . [1] => .. [2] => 20070319-203422-202.180.53.58-request_body-cIifAH [3] => 20070331-205545-210.151.155.75-request_body-ndb6cr [4] => 20070407-120415-74.120.199.72-request_body-e04f0i [5] => cpbandwidth [6] => horde_32001.log [7] => impatt8G6tEI [8] => impattnZ83wN [9] => mysql.sock [10] => sess_081964a8e938ed5ce96599ca69c3735f [11] => sess_0a68937c12c590e4e888729a6f3b3909 [12] => sess_196a3d41dcf968745b769fd0cc109027 [13] => sess_1d76fbb6d9a20281764dd704d7b3b42b [14] => sess_1df95e42d90db2a3b56b01b13418436f [15] => sess_251f03b20e722badf7f50b79bdf2d658 [16] => sess_2c6ca7e9f66fdec29eec68eb82b1af74 [17] => sess_372c43405de9f29c9f7da7e2f744b76b [18] => sess_3ec91e33b50ba9907a5c5a1708536e72 [19] => sess_3f53f2e40741897d8bf2221e1654ffe4 [20] => sess_57cb8a894f1ffb0e401b4f056aef72e1 [21] => sess_57fff08ce0f8e04aa5bdf951beac4a09 [22] => sess_60d24ab7ad329193f4c0a86b8523d620 [23] => sess_62b717b4d1cb02a212d069bbda572537 [24] => sess_643b41e3f4cbcddff8691733ec5ced73 [25] => sess_73954a8cdafc3ec27e100334f41f4687 [26] => sess_96b7e378fbe36ef9dd0d6971f055f1f4 [27] => sess_a4924e20ddf793e3b105f8e571fcb8f9 [28] => sess_ab4f0779de0d62ffdb663e2e5fa0e545 [29] => sess_b10ba9bb132e6b7e595e5dd6534456c7 [30] => sess_b509845b62cd47325f7e87da19950c8f [31] => sess_ce336da97e49a065da7a1e17f67905fe [32] => sess_cee73725b4740fd4a71007acc415e315 [33] => sess_d93ffa5f105f1f1be98c8d25d507d4d2 [34] => sess_db0673c8f47533b927ebd220b158b9a6 [35] => sess_db6015a1a82369de458bea63790dd2a7 [36] => sess_ea54cce4bee772eca9d051b9665ad767 [37] => sess_fc8499d1de617bfd49f3ed6a64a55dfe ) Array ( [0] => sess_fc8499d1de617bfd49f3ed6a64a55dfe [1] => sess_ea54cce4bee772eca9d051b9665ad767 [2] => sess_db6015a1a82369de458bea63790dd2a7 [3] => sess_db0673c8f47533b927ebd220b158b9a6 [4] => sess_d93ffa5f105f1f1be98c8d25d507d4d2 [5] => sess_cee73725b4740fd4a71007acc415e315 [6] => sess_ce336da97e49a065da7a1e17f67905fe [7] => sess_b509845b62cd47325f7e87da19950c8f [8] => sess_b10ba9bb132e6b7e595e5dd6534456c7 [9] => sess_ab4f0779de0d62ffdb663e2e5fa0e545 [10] => sess_a4924e20ddf793e3b105f8e571fcb8f9 [11] => sess_96b7e378fbe36ef9dd0d6971f055f1f4 [12] => sess_73954a8cdafc3ec27e100334f41f4687 [13] => sess_643b41e3f4cbcddff8691733ec5ced73 [14] => sess_62b717b4d1cb02a212d069bbda572537 [15] => sess_60d24ab7ad329193f4c0a86b8523d620 [16] => sess_57fff08ce0f8e04aa5bdf951beac4a09 [17] => sess_57cb8a894f1ffb0e401b4f056aef72e1 [18] => sess_3f53f2e40741897d8bf2221e1654ffe4 [19] => sess_3ec91e33b50ba9907a5c5a1708536e72 [20] => sess_372c43405de9f29c9f7da7e2f744b76b [21] => sess_2c6ca7e9f66fdec29eec68eb82b1af74 [22] => sess_251f03b20e722badf7f50b79bdf2d658 [23] => sess_1df95e42d90db2a3b56b01b13418436f [24] => sess_1d76fbb6d9a20281764dd704d7b3b42b [25] => sess_196a3d41dcf968745b769fd0cc109027 [26] => sess_0a68937c12c590e4e888729a6f3b3909 [27] => sess_081964a8e938ed5ce96599ca69c3735f [28] => mysql.sock [29] => impattnZ83wN [30] => impatt8G6tEI [31] => horde_32001.log [32] => cpbandwidth [33] => 20070407-120415-74.120.199.72-request_body-e04f0i [34] => 20070331-205545-210.151.155.75-request_body-ndb6cr [35] => 20070319-203422-202.180.53.58-request_body-cIifAH [36] => .. [37] => . ) -- Thanks - RevDave CoolCat@xxxxxxxxxxxxxxxx [db-lists] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php