第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

PHP中獲取文件創(chuàng)建、修改時(shí)間正確嗎?

PHP中獲取文件創(chuàng)建、修改時(shí)間正確嗎?

PHP
牧羊人nacy 2019-03-11 09:25:19
在mac上獲取到的時(shí)間和實(shí)際情況為何不符?現(xiàn)在問題是,filemtime和filectime一樣了 echo date('Y-m-d H:i:s', filemtime($file)); echo date('Y-m-d H:i:s', filectime($file)); echo date('Y-m-d H:i:s', fileatime($file)); 自己搜到的資料,說是unix沒有文件創(chuàng)建時(shí)間,只有inode修改時(shí)間。那么這種情況下就沒辦法知道文件的創(chuàng)建時(shí)間了嗎? https://stackoverflow.com/que... Use filectime. For Windows it will return the creation time, and for Unix the change time which is the best you can get because on Unix there is no creation time (in most filesystems).Note also that in some Unix texts the ctime of a file is referred to as being the creation time of the file. This is wrong. There is no creation time for Unix files in most Unix filesystems. 記錄一條,樓下提供的參考資料 http://php.net/manual/zh/func...If you need file creation time on Mac OS X: <?php if ($handle = popen('stat -f %B ' . escapeshellarg($filename), 'r')) { $btime = trim(fread($handle, 100)); echo strftime("btime: %Y.%m.%d %H:%M:%S\n", $btime); pclose($handle); } 本地時(shí)間正確
查看完整描述

2 回答

?
月關(guān)寶盒

TA貢獻(xiàn)1772條經(jīng)驗(yàn) 獲得超5個(gè)贊

filemtime 獲取 最后修改時(shí)間這個(gè)是正常的. 只是一個(gè)是24小時(shí)制, 一個(gè)是12小時(shí)制.
filectime 獲取inode修改時(shí)間
fileatime 取得文件的上次訪問時(shí)間

查看完整回答
反對(duì) 回復(fù) 2019-03-18
?
POPMUISE

TA貢獻(xiàn)1765條經(jīng)驗(yàn) 獲得超5個(gè)贊

你要確保本地服務(wù)器的時(shí)間上是準(zhǔn)確的,這樣就會(huì)對(duì)了

查看完整回答
反對(duì) 回復(fù) 2019-03-18
  • 2 回答
  • 0 關(guān)注
  • 456 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)