第1关:文本类表单内容 - 资料填写
if (KaTeX parse error: Expected '}', got 'EOF' at end of input: … echo "欢迎"._POST[‘name’].",你今年".$_POST[‘age’].“岁”;}
PHP语言之表单基础——educoder答案

第2关:按钮类表单内容 - 网页选择
website=isset(website = isset(_GET[‘website’])? GET[website]:;if(_GET['website'] : '';if(website){if (website==BAIDU)echo."<br>".http://www.baidu.com;elseif(website=='BAIDU') { echo '百度搜索'."<br>".'http://www.baidu.com';} else if (website==‘GOOGLE’) { echo ‘Google 搜索’."
".‘http://www.google.com’;} else if ($website==‘TAOBAO’) { echo ‘淘宝’."
".‘http://www.taobao.com’;}}
PHP语言之表单基础——educoder答案

第3关:下拉菜单类表单内容 - 地址选择
if(province=isset(province = isset(_GET[‘province’])? KaTeX parse error: Expected '}', got 'EOF' at end of input: …'] : ''){ if(province = isset($_GET[‘city’])? KaTeX parse error: Expected '}', got 'EOF' at end of input: …) { if(_GET[‘province’] == “湖南” && GET(city)=="")echo410000;elseif(_GET('city') == "长沙") echo '410000'; else if(_GET[‘province’] == “广东” && $_GET(‘city’) == “广州”) echo ‘510000’; else echo ‘选定城市不在选定省份’; }}
PHP语言之表单基础——educoder答案

第四关
if ($_FILES[‘file’][‘error’] > 0) { die(‘上传文件有误!’); } else { echo ‘文件的名称:’ . $_FILES[‘file’][‘name’] . “
”; echo ‘文件的类型:’ . $_FILES[‘file’][‘type’] . “
”; echo ‘文件的大小:’ . $_FILES[‘file’][‘size’] /1024 . “Kb
”; echo ‘文件的临时路径:’ . $_FILES[‘file’][‘tmp_name’] . “
”; }

PHP语言之表单基础——educoder答案

分类:

技术点:

相关文章: