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

為了賬號(hào)安全,請及時(shí)綁定郵箱和手機(jī)立即綁定

我到這一步為什么不能echo出創(chuàng)建的文件?

<?php

require_once 'dir.func.php';

require_once 'file.func.php';

$path="file";//打開名字為“file”的目錄

$info=readDirectory($path);//使用dir.func函數(shù),讀取$path目錄下的內(nèi)容,并且將讀取到的二維數(shù)組內(nèi)容賦值到$info上。

$act=$_REQUEST['act'];

$filename=$_REQUEST['filename'];

if ($act=="createFile"){

? ? echo $path.'--';

? ? echo $filename;

}


?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

<head>

<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>

<link href="css/cikonss.css" rel="stylesheet" type="text/css">

<style>div,ul,li{list-style-type:none;margin:0;padding:0;}</style>

<title>在線文件管理</title>

</head>

<body>

<h1>在線文件管理系統(tǒng)</h1>

<div id="top">

<ul il="nav">

<li><span class="icon icon-small icon-square"><span></span></span></li>

<li><span class="icon icon-small icon-square"><span></span></span></li>

<li></li>

<li></li>

<li></li>

</ul>

</div>

<table width="100%" cellsapcing="0" border="1" cellpadding="5" bgcolor="#ABCDEF" algin="center">

<tr id="createFolder" style="display:block;">

<td>

<input type="text" name="dirname"/>

<input type="submit" name="act" value="創(chuàng)建文件夾"/>

</td>

</tr>

<!--創(chuàng)建文件夾 -->

<tr id="createFile" style="display:block;">

<td>

<input type="text" name="filename"/>

<input type="hidden" name="path" value="<?php echo $path; ?>" />

<input type="hidden" name="act" value="createFile" />

<input type="submit" value="創(chuàng)建文件"/>

</td>

</tr>

<!-- 創(chuàng)建文件 -->

<tr>

<td>編號(hào)</td>

<td>名稱</td>

<td>類型</td>

<td>大小</td>

<td>可讀</td>

<td>可寫</td>

<td>可執(zhí)行</td>

<td>創(chuàng)建時(shí)間</td>

<td>修改時(shí)間</td>

<td>查看時(shí)間</td>

<td>操作</td>

</tr>

<?php

if ($info['file']){

$i=1;

foreach ($info['file'] as $val){

$p=$path."/".$val;//$path下的$val,$path為目錄,$val為文件。

?>

<tr>

<td><?php echo $i;?></td>

<td><?php echo $val?></td>

<td><?php $src=filetype($p)=="file"?"file_ico.png":"folder_ico.png";?><img src="images/<?php echo $src;?>" alt="" ?title="文件"/></td>

<td><?php echo transByte(filesize($p)); ?></td>

<td><?php $src=is_readable($p)?"correct.png":"error.png";?><img src="images/<?php echo $src;?>" width="30px" height="30px" /></td>

<td><?php $src=is_writable($p)?"correct.png":"error.png";?><img src="images/<?php echo $src;?>" width="30px" height="30px" /></td>

<td><?php $src=is_executable($p)?"correct.png":"error.png";?><img src="images/<?php echo $src;?>" width="30px" height="30px" /></td>

<td><?php echo date("Y-m-d H:i:s",filectime($p));?></td>

<td><?php echo date("Y-m-d H:i:s",filemtime($p));?></td>

<td><?php echo date("Y-m-d H:i:s",fileatime($p));?></td>

</tr>

<?php

$i++;

}

}

?>

</table>

</body>

</html>


正在回答

1 回答

你檢查一下創(chuàng)建目錄對么?

0 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

我到這一步為什么不能echo出創(chuàng)建的文件?

我要回答 關(guān)注問題
微信客服

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

幫助反饋 APP下載

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

公眾號(hào)

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