之前帮同学做了简单的数据分析,使用了Python的Pandans模块,加上使用函数清洗了数据,其实主要原因是,我真的不会Excel处理复杂数据,个人认为还不如编程来的直接。还好通过一段时间的努力,总算兑现了一月份之前搞定的诺言。
最近开始学习php。那么最基础的就是html和php的简单通信,也就是表单的处理。网上的教程和图灵的书籍,入门第一章都是语法基础,紧接着就是php获取表单数据。看来,这真的是第一步。
环境:OS10.10,phpstorm,xampp。
调试时候花了大量时间在phpstorm的配置,后来发现,必须得把php工程放在xampp文件夹的htdoc里面,才能成功调试,DW没试过,总之,如果用自己机器学习的话,这些应该足够了吧。代码来自图灵兔子书PHP与MySql动态网站开发LarryUllman写的。
Html部分:
<!DOCTYPE html >
<html>最近开始学习php。那么最基础的就是html和php的简单通信,也就是表单的处理。网上的教程和图灵的书籍,入门第一章都是语法基础,紧接着就是php获取表单数据。看来,这真的是第一步。
环境:OS10.10,phpstorm,xampp。
调试时候花了大量时间在phpstorm的配置,后来发现,必须得把php工程放在xampp文件夹的htdoc里面,才能成功调试,DW没试过,总之,如果用自己机器学习的话,这些应该足够了吧。代码来自图灵兔子书PHP与MySql动态网站开发LarryUllman写的。
Html部分:
<!DOCTYPE html >
<head>
<meta http-equiv= "content-type" content= "text/html; charset=utf-8" />
<title> TTY </title>
<style type= "text/css" title= "text/css" media= "all" >
label {
font-weight : bold ;
color : blue ;
}
</style>
</head>
<body>
<form action= "pro.php" method= "post" target= "_self" >
<fieldset>
<legend>
请输入信息:
</legend>
<p><label> Name: <input type= "text" name= "name" size= "20" maxlength= "40" /></label></p>
<p><label> Email地址: <input type= "text" name= "email" size= "40" maxlength= "60" /> </label></p>
<p><label for= "gender" > Gender: </label><input type= "radio" name= "gender" value= "M" /> Male
<input type= "radio" name= "gender" value= "F" /> Female </p>
<p><label> Age:
<select name= "age" >
<option value= "0-29" > 30以下 </option>
<option value= "30-60" > 30-60 </option>
<option value= "60+" > 60以上 </option>
</select>
</label></p>
<p><label> 内容: <textarea name= "comments" rows= "3" cols= "40" ></textarea> </label></p>
</fieldset>
<p align= "center" ><input type= "submit" name= "submit" value= "提交我的信息" /></p>
</form>
</body>
</html>
PHP文件:
<!DOCTYPE html > <html>
<head>
<meta charset= "UTF-8" >
<title> 表单回调测试 </title>
</head>
<body>
<?php
$name = $_POST [ 'name' ] ;
$email = $_POST [ 'email' ] ;
$comment = $_POST [ 'comments' ] ;
echo "<p>非常感谢! <b> $name </b>
您写了以下建议:<br/>
$comment </p>
<p>我们将会回复邮件到您的email地址:,<i> $email </i></p>" ;
?>
</body>
参考:http://www.cnblogs.com/vincent_ds/archive/2012/11/09/2761900.html