Is this possible?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mib
Forum Newbie
Posts: 3
Joined: Sun Apr 24, 2011 8:17 am

Is this possible?

Post by mib »

Hi,

What i want to be able to do is create a php page from another php page.

The reason for this is i want one page to create to generate the code for the user however rather than the user having to copy and paste the code for the page themselves i would like the file to be automatically created and placed in the correct folder.

Any help would be appriciated, (even if i means i have to use another language to create the php file.)

Thanks
MIB
fugix
Forum Contributor
Posts: 207
Joined: Fri Mar 18, 2011 8:01 pm

Re: Is this possible?

Post by fugix »

yes you can use fopen() to create the given file....then fwrite() to put information into it
mib
Forum Newbie
Posts: 3
Joined: Sun Apr 24, 2011 8:17 am

Re: Is this possible?

Post by mib »

Thank you for your reply i was looking at that on the internet erlier however all explample were with txt files so i just assumemed it did not work with anything else.

Thanks Alot i will try this now
fugix
Forum Contributor
Posts: 207
Joined: Fri Mar 18, 2011 8:01 pm

Re: Is this possible?

Post by fugix »

no problem..let us know if you need further assistance
mib
Forum Newbie
Posts: 3
Joined: Sun Apr 24, 2011 8:17 am

Re: Is this possible?

Post by mib »

I managed to get everything working!

thanks alog fugix you really helped me out
Post Reply