原本想單獨寫這個方法function erxuanyi($oneform,$twoform,$inputname,$ipnuts,$zhengzeone,$zhengzetwo,$tishione,$tishitwo)然后在if ($_SERVER["REQUEST_METHOD"] == "POST")內調用erxuanyi("yaohuo","yaohuothers",$yaohuothers,$yaohuo,"/^[a-eA-E]$/","/^[\x7f-\xff]*$/","只允許一個A到E的大寫字母","只允許輸入漢字");為什么在前臺html代碼下面輸出 <div class="Other" style="margin-bottom: 20px;"> <span class="yaohuo">6題:要貨:</span> <input ?type="text" name="yaohuo" value="" style="text-transform:uppercase;"> <span class="others">要貨其他:</span> ?? <input ?type="text" name="yaohuothers" value=""> <span class="error"><?php echo $yaohuothers;?>/*為什么這里輸出不出來沒用啊QWQ*/</span>不寫成單獨的方法直接一個個復制語句就有用 不過代碼重復也太多了啊QWQ
1 回答

5E
TA貢獻115條經驗 獲得超39個贊
拼寫錯誤。erxuanyi()方法中不是$_POST["$oneform"],應該是$_POST[$oneform],沒有雙引號,$twoform、$zhengzeone、$tishitwo 同理,沒有引號。
- 1 回答
- 0 關注
- 1334 瀏覽
添加回答
舉報
0/150
提交
取消