Page 1 of 1

Is this possible?

Posted: Sun Apr 24, 2011 8:21 am
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

Re: Is this possible?

Posted: Sun Apr 24, 2011 8:48 am
by fugix
yes you can use fopen() to create the given file....then fwrite() to put information into it

Re: Is this possible?

Posted: Sun Apr 24, 2011 8:58 am
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

Re: Is this possible?

Posted: Sun Apr 24, 2011 9:03 am
by fugix
no problem..let us know if you need further assistance

Re: Is this possible?

Posted: Sun Apr 24, 2011 10:37 am
by mib
I managed to get everything working!

thanks alog fugix you really helped me out