| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| NamePros Regular Join Date: May 2004
Posts: 958
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | |
| |
| | #2 (permalink) |
| NamePros Expert Join Date: Nov 2003 Location: Scotland
Posts: 5,074
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Here is the code you can use:- The function itself ????: NamePros.com http://www.namepros.com/programming/142592-php-reading-displaying-files-directory-help.html PHP Code: PHP Code:
Last edited by Peter; 11-24-2005 at 11:27 AM.
|
| |
| | #3 (permalink) |
| Tech Support Join Date: Mar 2005
Posts: 4,944
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Not totally sure on this, but you could possibly try something like this: PHP Code:
Last edited by SecondVersion; 11-24-2005 at 11:26 AM.
|
| |
| | #5 (permalink) |
| NamePros Expert Join Date: Nov 2003 Location: Scotland
Posts: 5,074
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | just a note secondversion but not really any need for the following line:- if($files != "." && $files != "..") that is addressed in the next if statement as they do not meet that if statement anyway. ooh and just noticed when looking at your code I forgot to close the handle |
| |
| | #6 (permalink) | ||||
| Eating Pie Join Date: Nov 2004 Location: Canada
Posts: 2,267
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Both of those above will work. I recommand SecondVersions because if you got like 7000 files you will want less amount of php code. For fliths it sets it than it parses it. Which would create some slowness when doing high amounts. SecondVersions will just parse it. iNod.
????: NamePros.com http://www.namepros.com/showthread.php?t=142592 iNod.
__________________ I feel old. | ||||
| |
| | #7 (permalink) | ||||
| Tech Support Join Date: Mar 2005
Posts: 4,944
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
And no problem virgil | ||||
| |
| | #8 (permalink) | ||||
| NamePros Expert Join Date: Nov 2003 Location: Scotland
Posts: 5,074
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
I was simply pointing it out simple as that. And you have completely missed the point of the post. It had nothing to do with the curly braces. I was telling him he had no need to check if the file name was . or .. as the second if statement check alread what the file name is and both of those will not match the second statement. If you read his code you will actuially see that he has in fact not left them out I just copied and pasted the single line so he knew which 1 I was on about
Last edited by Peter; 11-24-2005 at 11:39 AM.
| ||||
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| HOWTO: Install the Apache Web Server, Perl, PHP, and MySQL on Windows | deadserious | Webmaster Tutorials | 96 | 05-27-2007 01:24 PM |
| Greatest Image Gallery Tutorial Ever | Wybe | Webmaster Tutorials | 5 | 12-20-2005 10:51 AM |
| Googlism - What does google think of you? | deadserious | The Break Room | 55 | 12-15-2005 09:09 AM |
| PHP includes refererencing files from different directory thread | FreeBaGeL | Programming | 6 | 03-08-2005 12:10 PM |