Page 1 of 1

create a php file through php code

Posted: Sat Oct 01, 2005 3:55 am
by rajan
Can i create a php file from php code like a text file? If yes then how

Posted: Sat Oct 01, 2005 4:11 am
by n00b Saibot
PHP files are after all text files, create them as you would other text files :roll:

Posted: Sat Oct 01, 2005 4:23 am
by pilau
Exactly, Just make a string that contains all the PHP code, and then just file_put_contents() it.

Posted: Sat Oct 01, 2005 4:44 am
by n00b Saibot
FYI, file_put_contents() is PHP5

Posted: Sat Oct 01, 2005 4:54 am
by pilau
I know, but he didn't say he's using PHP4, did he?
And besides, using the PEAR Compat package, you get file_put_contents() for PHP4 as well.

Posted: Sat Oct 01, 2005 5:04 am
by n00b Saibot
pilau wrote:I know, but he didn't say he's using PHP4, did he?
98% do
pilau wrote:And besides, using the PEAR Compat package, you get file_put_contents() for PHP4 as well.
much thanks, i will write my own ;)

Posted: Sat Oct 01, 2005 5:15 am
by pilau
n00b Saibot wrote:
pilau wrote:And besides, using the PEAR Compat package, you get file_put_contents() for PHP4 as well.
much thanks, i will write my own ;)
Sure, go ahead, you have my permission. ;)

Posted: Sat Oct 01, 2005 5:28 am
by n00b Saibot
pilau wrote:
n00b Saibot wrote:
pilau wrote:And besides, using the PEAR Compat package, you get file_put_contents() for PHP4 as well.
much thanks, i will write my own ;)
Sure, go ahead, you have my permission. ;)
I don't take permissions, I grant them :twisted:

Code: Select all

GRANT pilau PERMISSIONS FOR eating PULAO

Posted: Sat Oct 01, 2005 8:36 am
by pilau
Oh yeah? Well..

Code: Select all

GRANT `n00b saibot` PRIVILAGE TO 'newb'

Posted: Sat Oct 01, 2005 8:39 am
by feyd
enough off-topic nonsense.