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

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

第2关:按钮类表单内容 - 网页选择
w e b s i t e = i s s e t ( website = isset( website=isset(_GET[‘website’])? G E T [ ′ w e b s i t e ′ ] : ′ ′ ; i f ( _GET['website'] : '';if( GET[website]:;if(website){if ( w e b s i t e = = ′ B A I D U ′ ) e c h o ′ 百 度 搜 索 ′ . " < b r > " . ′ h t t p : / / w w w . b a i d u . c o m ′ ; e l s e i f ( website=='BAIDU') { echo '百度搜索'."
".'http://www.baidu.com';} else if (
website==BAIDU)echo."<br>".http://www.baidu.com;elseif(
website==‘GOOGLE’) { echo ‘Google 搜索’."
".‘http://www.google.com’;} else if ($website==‘TAOBAO’) { echo ‘淘宝’."
".‘http://www.taobao.com’;}}
PHP语言之表单基础——educoder答案_第2张图片

第3关:下拉菜单类表单内容 - 地址选择
if( p r o v i n c e = i s s e t ( 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’] == “湖南” && G E T ( ′ c i t y ′ ) = = " 长 沙 " ) e c h o ′ 41000 0 ′ ; e l s e i f ( _GET('city') == "长沙") echo '410000'; else if( GET(city)=="")echo410000;elseif(_GET[‘province’] == “广东” && $_GET(‘city’) == “广州”) echo ‘510000’; else echo ‘选定城市不在选定省份’; }}
PHP语言之表单基础——educoder答案_第3张图片

第四关
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答案_第4张图片

你可能感兴趣的:(php)