Page 1 of 1

Create and Display files

Posted: Sun Jul 23, 2006 8:08 pm
by bobby9101
I would like to have the contents of MySQL row "haha" be all the files from directory "haha"
how is that possible?

Posted: Sun Jul 23, 2006 8:15 pm
by feyd
You might need to give us a tiny bit more detail than what you've given so far. Like how you want it store in the record, what the table structure looks like, etc.. you know, the small stuff.

Re: MySQL + Folder Files???

Posted: Sun Jul 23, 2006 8:52 pm
by alex.barylski
bobby9101 wrote:I would like to have the contents of MySQL row "haha" be all the files from directory "haha"
how is that possible?
AFAIK MySQL by default, at least the default table, are stored in files...I think it's myISAM...at least they are in the version I use on my test server...

tables are stored as files and records are stored inside those files...

I'm not sure what your asking though... :roll:

Posted: Sun Jul 23, 2006 9:00 pm
by bobby9101
I rethought it... i dont even need mysql
here is what i would like
I have a form and I would liek to be able to enter a name into the form and then it create a file like name.php
and then i would liek a script to read alll the .php files in that folder
how do i do that?

Posted: Sun Jul 23, 2006 10:52 pm
by feyd
look into fopen() and opendir() or the SPL classes if you're running php 5.

Posted: Sun Jul 23, 2006 11:53 pm
by John Cartwright
and glob() may be usefull too