摘要: <?php //form表单传过来的上传的文件名称 $poth = $_POST['poth']; //获取上传的文件名 $tmp = $_FILES['poth']['tmp_name']; //上传的文件 保存指定路径 $poth = 'img/'.$_FILES['poth']['name']; //将上传的文件移动到新位置 move_uploaded_file($tmp, $p... 阅读全文
posted @ 2019-06-22 09:58 久醉121 阅读(90) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2019-06-22 09:32 久醉121 阅读(229) 评论(0) 推荐(0) 编辑
摘要: 1 <!-- yii2.0用post可以直接传值 --> 2 <form action="index.php?r=控制器名/方法名" method="post"> 3 <input type="text" name="user"> 4 <input type="submit" value="添加"> 阅读全文
posted @ 2019-06-22 09:15 久醉121 阅读(426) 评论(0) 推荐(0) 编辑
摘要: 1 <!-- yii2.0用get方法传值 --> 2 <form action="index.php" method="get"> 3 <!-- yii2.0用get方法传值必须加入hidden才可以成功 --> 4 <input type="hidden" name="r" value="控制器 阅读全文
posted @ 2019-06-22 09:12 久醉121 阅读(238) 评论(0) 推荐(0) 编辑