PHP touch() 函數(shù)
PHP touch() 函數(shù)

定義和用法
touch() 函數(shù)設(shè)置指定文件的訪問(wèn)和修改時(shí)間。
如果成功,該函數(shù)返回 TRUE。如果失敗,則返回 FALSE。
語(yǔ)法
touch(filename,time,atime)
參數(shù) | 描述 |
---|---|
filename | 必需。規(guī)定要接觸的文件。 |
time | 可選。設(shè)置時(shí)間。默認(rèn)設(shè)置為當(dāng)前系統(tǒng)時(shí)間。 |
atime | 可選。設(shè)置訪問(wèn)時(shí)間。如果參數(shù)未設(shè)置或設(shè)置為與 time 參數(shù)相同,則默認(rèn)設(shè)置為當(dāng)前系統(tǒng)時(shí)間。 |
提示和注釋
注釋:如果指定的文件不存在,則會(huì)被創(chuàng)建。
實(shí)例
<?php
touch("test.txt");
?>
touch("test.txt");
?>

相關(guān)文章
- PHP 簡(jiǎn)介
- PHP 數(shù)組排序
- PHP While 循環(huán)
- PHP Session
- PHP 高級(jí)過(guò)濾器
- PHP array_change_key_case() 函數(shù)
- PHP array_count_values() 函數(shù)
- PHP array_diff_key() 函數(shù)
- PHP array_intersect_assoc() 函數(shù)
- PHP array_intersect_key() 函數(shù)
- PHP array_key_exists() 函數(shù)
- PHP array_map() 函數(shù)
- PHP array_multisort() 函數(shù)
- PHP array_replace() 函數(shù)
- PHP array_replace_recursive() 函數(shù)
- PHP array_slice() 函數(shù)
- PHP array_splice() 函數(shù)
- PHP array_udiff_uassoc() 函數(shù)
- PHP array_uintersect_assoc() 函數(shù)
- PHP each() 函數(shù)