2010-01-11 147 views
0

我有一個文件夾(我的意思是一期工程),其連接在服務器(SVN)顯示日期正確

我的要求是,以顯示SVN更新用數量和更新的日期,在一個頁面

$ info = @file('。svn/entries'); 然後我顯示的數組中的值$ info

echo $ info [9]應該來2010-01-11T06:21:33.250281Z.But日期是另一個日期2010-01-08T10:15 :24.920971Z

我DONOT得到的原因,請大家幫我

的內容在文件中」的.svn /條目是

9 

dir 
2585 
http://linto/svn/boats/trunk 
http://linto:8080/svn/boats 



2010-01-11T06:21:33.250281Z 
2585 
stefan 
has-props 

svn:special svn:externals svn:needs-lock 











7cfa2e9e-4e07-4858-8dae-0f23e53ec418 

tmp 
dir 

tests 
dir 

application 
dir 

database 
dir 

htdocs 
dir 

library 
dir 

logs 
dir 

bin 
dir 

zend_config.php 
file 




2009-11-10T11:12:01.000000Z 
3bc0c01861134dc7691a5f3c14e7f449 
2009-11-10T10:19:52.004372Z 
2254 
kai 





















937 

README 
file 




2009-11-02T04:52:20.000000Z 
c207747d5c69969a9663d7438cf46c84 
2009-10-02T08:49:00.954220Z 
1869 
root 





















216 
+0

我試過你的代碼和文件,條目,當我輸出信息[9]我得到的結果:string(28) 「2010-01-11T06:21:33.250281Z」 – 2010-01-11 07:36:06

回答

0

我的猜測是:你讀錯文件。

$path = '.svn/entries'; 
echo '<pre>Debug: current working directory is ', htmlspecialchars(getcwd()), "</pre>\n"; 
echo '<pre>Debug: reading ', htmlspecialchars(realpath($path)), "</pre>\n"; 
$info = @file($path); 
echo $info[9]; 
+0

這是我的結論也是如此。 – 2010-01-11 07:44:06