Forum Moderators: coopster

Message Too Old, No Replies

putting files in a folder

         

web_server

8:30 pm on Mar 24, 2006 (gmt 0)



Hi,
I have a script that makes PHP files . I would like to put them in a separate folder . I mean I want the script to be in a folder and the files it makes in another folder .how can I make this?
Thank you .

vacorama

9:50 pm on Mar 24, 2006 (gmt 0)

10+ Year Member



if your on *nix, you just need write access on the folder then you can use
$file_handle = fopen ('destination_folder/file_name', 'w'); #w for write mode
then you can..

fputs($file_handle, $file_data);