Re: [PHP] Readdir() question

2008-09-12 Thread Luke
When I need to do 'filesystem' type things I use MySQL to map all of the files. This offers lot's of versatility in that you could just make a single folder called filesystem and have all of your files in the root of that folder - then use mysql to map virtual folders and structures and such.

Re: [PHP] Readdir() question

2008-09-12 Thread Jochem Maas
Luke schreef: When I need to do 'filesystem' type things I use MySQL to map all of the files. This offers lot's of versatility in that you could just make a single folder called filesystem and have all of your files in the root of that folder - then use mysql to map virtual folders and

Re: [PHP] Readdir() question

2008-09-12 Thread Luke
Ok, one folder on your webserver, and put all of the files that you want to include on your website/system in this folder (also uploading into this folder); just in the root of that folder, so say you wouldn't have anymore folders under it. Make a table called 'Files,' containing: ID Name Type

Re: [PHP] Readdir() question

2008-09-12 Thread Nathan Rixham
Luke wrote: Ok, one folder on your webserver, and put all of the files that you want to include on your website/system in this folder (also uploading into this folder); just in the root of that folder, so say you wouldn't have anymore folders under it. Make a table called 'Files,' containing:

RE: [PHP] Readdir() question

2008-09-12 Thread Boyd, Todd M.
-Original Message- From: Luke [mailto:[EMAIL PROTECTED] Sent: Friday, September 12, 2008 7:13 AM To: Jochem Maas Cc: [EMAIL PROTECTED]; php-general@lists.php.net Subject: Re: [PHP] Readdir() question Ok, one folder on your webserver, and put all of the files that you want

[PHP] Readdir() question

2008-09-11 Thread Ben Stones
Hi, I'm going to make a small browser based file system for ease of small updates that I make frequently on my Website. First of all I want to loop all the files on the same directory and to tell PHP read the same directory, I think I'd need to use the magic constant I think its called, __DIR__

Re: [PHP] Readdir() question

2008-09-11 Thread Stut
On 11 Sep 2008, at 13:12, Ben Stones wrote: I'm going to make a small browser based file system for ease of small updates that I make frequently on my Website. First of all I want to loop all the files on the same directory and to tell PHP read the same directory, I think I'd need to use the

RE: [PHP] Readdir() question

2008-09-11 Thread Jay Blanchard
[snip] I'm going to make a small browser based file system for ease of small updates that I make frequently on my Website. First of all I want to loop all the files on the same directory and to tell PHP read the same directory, I think I'd need to use the magic constant I think its called, __DIR__

Re: [PHP] Readdir() question

2008-09-11 Thread Jochem Maas
Ben Stones schreef: Hi, I'm going to make a small browser based file system for ease of small updates that I make frequently on my Website. First of all I want to loop all the files on the same directory and to tell PHP read the same directory, I think I'd need to use the magic constant I think

Re: [PHP] Readdir() question

2008-09-11 Thread Nathan Rixham
Stut wrote: On 11 Sep 2008, at 13:12, Ben Stones wrote: I'm going to make a small browser based file system for ease of small updates that I make frequently on my Website. First of all I want to loop all the files on the same directory and to tell PHP read the same directory, I think I'd need

Re: [PHP] Readdir() question

2008-09-11 Thread Jochem Maas
Nathan Rixham schreef: Stut wrote: On 11 Sep 2008, at 13:12, Ben Stones wrote: I'm going to make a small browser based file system for ease of small updates that I make frequently on my Website. First of all I want to loop all the files on the same directory and to tell PHP read the same

Re: [PHP] Readdir() question

2008-09-11 Thread Nathan Rixham
Jochem Maas wrote: Nathan Rixham schreef: Stut wrote: maybe this is into coding standards and ethics.. but this may be acceptable: if( !defined('__DIR__') ) { define('__DIR__' , dirname(__FILE__)); } however realistically you'd have to do this in every file and nto just in one include

Re: [PHP] Readdir() question

2008-09-11 Thread Jochem Maas
Nathan Rixham schreef: Jochem Maas wrote: Nathan Rixham schreef: Stut wrote: maybe this is into coding standards and ethics.. but this may be acceptable: if( !defined('__DIR__') ) { define('__DIR__' , dirname(__FILE__)); } however realistically you'd have to do this in every file and nto

Re: [PHP] readdir() question

2006-08-16 Thread Richard Lynch
On Tue, August 15, 2006 11:00 pm, John Meyer wrote: Richard Lynch wrote: Do you really mean opendir() or do you mean readdir() ??? readdir(). The point is why do you need to put it as !== vs. != http://us3.php.net/manual/en/language.types.type-juggling.php -- Like Music?

[PHP] readdir() question

2006-08-15 Thread John Meyer
I have a script to list the files in a directory: select name=letters ?php $open = opendir(.); while ($file = readdir($open) != false) { ? option value=?=$file??=$file?/option ?php } ? /select /form And all I am getting are 1s. I think I'm doing it right, what is

Re: [PHP] readdir() question

2006-08-15 Thread Tom Chubb
On 15/08/06, John Meyer [EMAIL PROTECTED] wrote: I have a script to list the files in a directory: select name=letters ?php $open = opendir(.); while ($file = readdir($open) != false) { ? option value=?=$file??=$file?/option ?php } ? /select /form And all I am

Re: [PHP] readdir() question

2006-08-15 Thread Richard Lynch
On Tue, August 15, 2006 12:04 pm, John Meyer wrote: I have a script to list the files in a directory: select name=letters ?php $open = opendir(.); while ($file = readdir($open) != false) { ? option value=?=$file??=$file?/option ?php } ? /select /form And all

Re: [PHP] readdir() question

2006-08-15 Thread John Meyer
Richard Lynch wrote: On Tue, August 15, 2006 12:04 pm, John Meyer wrote: I have a script to list the files in a directory: select name=letters ?php $open = opendir(.); while ($file = readdir($open) != false) { ? option value=?=$file??=$file?/option ?php } ? /select

Re: [PHP] readdir() question

2006-08-15 Thread Richard Lynch
On Tue, August 15, 2006 5:56 pm, John Meyer wrote: Richard Lynch wrote: On Tue, August 15, 2006 12:04 pm, John Meyer wrote: I have a script to list the files in a directory: select name=letters ?php $open = opendir(.); while ($file = readdir($open) != false) { ? option

Re: [PHP] readdir() question

2006-08-15 Thread John Meyer
Richard Lynch wrote: Do you really mean opendir() or do you mean readdir() ??? readdir(). The point is why do you need to put it as !== vs. != -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] readdir() question

2006-08-15 Thread Chris
John Meyer wrote: Richard Lynch wrote: Do you really mean opendir() or do you mean readdir() ??? readdir(). The point is why do you need to put it as !== vs. != They mean different things. !== means check the values are not the same AND check their types. != means check the values