共計 274 個字符,預(yù)計需要花費(fèi) 1 分鐘才能閱讀完成。
PHP 的 copy() 函數(shù)用于將文件從一個位置復(fù)制到另一個位置。
copy() 函數(shù)的語法如下:
bool copy (string $source , string $destination [, resource $context] )
參數(shù)說明:
- $source:要復(fù)制的文件的路徑。
- $destination:復(fù)制文件的目標(biāo)路徑。
- $context(可選):可使用 stream_context_create() 函數(shù)創(chuàng)建的流上下文資源,用于指定文件的訪問權(quán)限、HTTP 請求頭等。
copy() 函數(shù)在成功復(fù)制文件時返回 true,否則返回 false。
丸趣 TV 網(wǎng) – 提供最優(yōu)質(zhì)的資源集合!
正文完