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

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

為什么點(diǎn)擊 新建按鈕沒(méi)有反應(yīng)

<?php

$path="file";

$act=$_REQUEST['act'];

$filename=$_REQUEST['filename'];

$info=readDirectory($path);

//print_r($info);

$redirect="index.php?path={$path}";

if($act=="createFile"){

? ? $mes=createFile($path."/".$filename);

? ? alertMes($mes,$redirect);

}

function createFile($filename){

? ? //驗(yàn)證文件的合法性是否包含/,*,<>,?,|

? ? $pattern="/[\/,\*,<>,\?\|]/";

? ? if (!preg_match($pattern,basename($filename))){

? ? ? ? //檢測(cè)當(dāng)前目錄下是否存在同名文件

? ? ? ? if (!file_exists($filename)){

? ? ? ? ? ? //通過(guò)touch($filename)來(lái)創(chuàng)建

? ? ? ? ? ? if (touch($filename)){

? ? ? ? ? ? ? ? return "文件創(chuàng)建成功!";

? ? ? ? ? ? }else{

? ? ? ? ? ? ? ? ? ? return " 文件創(chuàng)建失??!";

? ? ? ? ? ? ? ? }

? ? ? ? }else {

? ? ? ? ? ? return "文件已存在,請(qǐng)重命名后創(chuàng)建!";

? ? ? ? }

? ? }else {

? ? ? ? return "非法文件名";

? ? }

? ? }

function alertMes($mes,$url) {

? ? echo "<script type='text/javascript'> alert('{$mes}');location.href='{$url}'; ?</script> ";

}

<td>請(qǐng)輸入文件名稱</td>

<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>


正在回答

2 回答

<form action="index.php" method="psot" enctype="multipart/form-data">

...........

</form>

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

人艱不拆8 提問(wèn)者

你果然是大神??!仰慕
2017-02-21 回復(fù) 有任何疑惑可以回復(fù)我~
#2

Hzqiang 回復(fù) 人艱不拆8 提問(wèn)者

不要問(wèn)我為什么,因?yàn)槲乙卜高^(guò)同樣的錯(cuò)誤。。。
2017-02-22 回復(fù) 有任何疑惑可以回復(fù)我~
#3

人艱不拆8 提問(wèn)者 回復(fù) Hzqiang

媽媽說(shuō)不懂就要問(wèn),我才像你一樣
2017-02-22 回復(fù) 有任何疑惑可以回復(fù)我~

表單form你都沒(méi)有寫(xiě)

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

舉報(bào)

0/150
提交
取消

為什么點(diǎn)擊 新建按鈕沒(méi)有反應(yīng)

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

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

幫助反饋 APP下載

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

公眾號(hào)

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