PHP FTP上下文选项
介绍
下面列出了 http://和https://传输的上下文选项-
本示例说明如何允许 fopen() 覆盖FTP站点上的文件。
示例
<?php
$ftp_path = 'ftp://username:password@example.com/example.txt';
$stream_options = array('ftp' => array('overwrite' => true));
$stream_context = stream_context_create($stream_options);
$fh = fopen($ftp_path, 'w', 0, $stream_context);
fputs($fh, 'Hello World');
fclose($fh);
?>热门推荐
10 孩子成长祝福语老师简短
11 客户要远行祝福语简短
12 企业英语祝福语大全简短
13 生日祝福语简短独特姑姑
14 皇家新春祝福语大全简短
15 幼儿生日聚餐祝福语简短
16 园长退休祝福语老师简短
17 初三考试祝福语简短
18 送给外婆祝福语简短的话