Can i use php to make a file

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Jay

Postby Jay » Thu Sep 12, 2002 2:43 pm

Yes, you can do this. The manual has a whole section on how to use the file system. However, in your case I wouldn't advise it. I'd advise inserting all the data into a database and then using this to populate a single 'template' page! It would be much much easier to manage and update in the future!

Even if you haven't got access to a MySQL (or similar) database, you can store the information in a single array in one file, or perhaps in their own arrays in their own individual pages (so user john doe has john_doe.php which contains all the variables required: name, address, what he wears to bed, etc). Then you can dynamically 'include' this information in your template in order to populate the variables!


Return to “PHP coding => General”

Who is online

Users browsing this forum: No registered users and 3 guests