一部のデータをエクスポートし、ファイルを作成して、データをファイルに書き込んでいます...
私のファイルは ftp サーバーに表示されますが、空です...
これがコードです。
//Connect to the FTP server
$ftpstream = @ftp_connect('localhost');
//Login to the FTP server
$login = @ftp_login($ftpstream, 'some_login', 'some_password');
if($login) {
//We are now connected to FTP server.
//Create a temporary file
$temp = tmpfile();
//Upload the temporary file to server
@ftp_fput($ftpstream, '/httpdocs/itineraryschedule.txt', $temp, FTP_ASCII);
//Make the file writable by all
ftp_site($ftpstream,"CHMOD 0777 /httpdocs/itineraryschedule.txt");
//Write to file
$fp = fopen('var/www/vhosts/cruiseandmaritime.com/httpdocs/itineraryschedule.txt', 'w');
fputs($fp, 'some data');
fclose($fp);
//Make the file writable only to owner
ftp_site($ftpstream,"CHMOD 0644 /httpdocs/itineraryschedule.txt");
}
私は困惑しています!
リッチ :)