$act = $_REQUEST['act']; $filename = $_REQUEST['filename']; if($act == "createFile") { echo $path,"---"; echo $filename; }
敲完上面的代码后,页面报出:
Notice: Undefined index: act in D:\Workspace\PhpStorm\File_Online_Manager\index.php on line 14
Notice: Undefined index: filename in D:\Workspace\PhpStorm\File_Online_Manager\index.php on line 15
随便文件名称中输入1.txt,点击提交后,这个Notice消失了,但是页面上面没有输出file--1.txt
我是不是什么代码漏掉了,你有没在视频里敲出来?