2
所以我不知道是什麼原因我的代碼不能正常工作去了一個目錄,但這裏是錯誤,我得到:不能夠使用使用simplexml_load_file
Warning: simplexml_load_file() [function.simplexml-load-file]: I/O warning : failed to load external entity "../../setting.xml" in /home1/sk8ermid/public_html/MVP/themes/SDS-2013/home.php on line 3
這裏是我使用的代碼:
<?php
$settings = simplexml_load_file('../../setting.xml');
$site_title = $settings->title;
?>
我想上去兩個「settings.xml」文件所在的目錄。我是以正確的方式做到這一點,還是有另一種方式來做到這一點?