課程
/后端開發(fā)
/PHP
/PHP進(jìn)階篇
$filename = '/data/webroot/usercode/code/resource/test.txt'; 我想把這路徑打開,看看里面有什么內(nèi)容。
2015-11-24
源自:PHP進(jìn)階篇 5-3
正在回答
有BUG ,,路徑是'/data/webroot/usercode/resource/test.txt',,修改一下,就可以啦!
file_get_contents($filename),,,內(nèi)容也就是“this is a test file”
如果webroot是根目錄的話,fopen("usercode/code/resource/test.txt","r");
舉報(bào)
輕松學(xué)習(xí)PHP中級(jí)課程,進(jìn)行全面了解,用PHP快速開發(fā)網(wǎng)站程序
1 回答那么怎么調(diào)用啊 才能獲取帶路徑cookie
3 回答怎么沒打印出值來
2 回答php手冊(cè)下載后怎么打開
1 回答源代碼路徑錯(cuò)了
1 回答把且為1開頭改成不能以字母開頭!怎么改?
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號(hào)-11 京公網(wǎng)安備11010802030151號(hào)
購課補(bǔ)貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動(dòng)學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號(hào)
2016-08-21
有BUG ,,路徑是'/data/webroot/usercode/resource/test.txt',,修改一下,就可以啦!
file_get_contents($filename),,,內(nèi)容也就是“this is a test file”
2015-11-24
如果webroot是根目錄的話,fopen("usercode/code/resource/test.txt","r");