Hi everybody,
I need to create a temporary file in which I could write some php code from one of my scripts, can anybody help me?
Thanks in advance
create a file in php with php code into it
Moderator: General Moderators
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Look up the following functions in the PHP manual and see if you can't follow some of the examples. There a lot of good examples that can be used to develop your own file system application.
tmpfile
fopen
fgets
fputs (or fwrite)
file
fclose
Basically you want to create a file somewhere on the server and open it, write to it the information that you want then close it. I believe the above functions will get you started in the rigth direction.
tmpfile
fopen
fgets
fputs (or fwrite)
file
fclose
Basically you want to create a file somewhere on the server and open it, write to it the information that you want then close it. I believe the above functions will get you started in the rigth direction.