calmchess Posted January 16, 2009 Share Posted January 16, 2009 I'm useing the following code to write a file ....my question is how do i specify the directory i want that file written to? Right now it just writes to the directory that the php script resides in. $ourFileName = $arr0[0].".html"; $ourFileHandle = fopen($ourFileName, 'w') or die("can't open file"); fclose($ourFileHandle); Link to comment https://forums.phpfreaks.com/topic/141086-php-write-path-help/ Share on other sites More sharing options...
flyhoney Posted January 16, 2009 Share Posted January 16, 2009 $ourFileName = 'path/to/file/' . $arr0[0] . '.html'; $ourFileHandle = fopen($ourFileName, 'w') or die("can't open file"); fclose($ourFileHandle); Link to comment https://forums.phpfreaks.com/topic/141086-php-write-path-help/#findComment-738403 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.