[請益] IIS裡面的相對路徑無法使用
今天我興沖沖在自己本機(WAMP)寫好了一隻PHP程式
放到學校IIS的主機之後
詭異的事情發生了
竟然出現錯誤訊息
是有關路徑的
訊息如下
Warning: opendir(/photos) [function.opendir]: failed to open dir: Invalid
argument in D:\TMU\APPS2012\iframe.php on line 18
網址在此:http://tinyurl.com/85s93n4
完整程式碼如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"" rel="nofollow">http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head profile="" rel="nofollow">http://gmpg.org/xfn/11">
<title>APPS 測試專用</title>
<meta http-equiv='content-type' content='text/html; charset=utf-8'/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="jquery.cycle.all.js"></script>
<script type="text/javascript" src="contentflow.js" load="white" ></script>
<style type="text/css">
body { font-family: Georgia; line-height: 19px; background:#fafafa; }
</style>
</head>
<body>
<?php
ini_set("display_errors", "On");
echo function_exists("opendir");
$base_dir = "/photos";
$fso = opendir($base_dir);
echo $base_dir."<hr/>" ;
while($flist=readdir($fso)){
echo $flist."<br/>" ;
}
closedir($fso)
?>
</body>
</html>
很奇怪耶
不知道開個資料夾也開不起來0.0
到底是發生啥事情啊?QAQ
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 125.227.67.234
→
12/13 12:22, , 1F
12/13 12:22, 1F
→
12/13 12:57, , 2F
12/13 12:57, 2F
→
12/13 16:52, , 3F
12/13 16:52, 3F
→
12/13 17:37, , 4F
12/13 17:37, 4F
→
12/13 18:00, , 5F
12/13 18:00, 5F
→
12/14 00:59, , 6F
12/14 00:59, 6F
→
12/14 21:44, , 7F
12/14 21:44, 7F
PHP 近期熱門文章
PTT數位生活區 即時熱門文章