以下程序實現從
/hello/bowmanhan/
到
/hello.php?user=ddddddd
的url映射,即php裏常講的僞靜態php
D:htdocs/ ├─phpapp1├─ hello.php ├ ├─ .htaccess
hello.php文件數據庫
#filename:hello.php hello<?php echo $_GET[‘name’]; ?>
.htaccess文件flask
#filename:.htaccess RewriteEngine on RewriteRule ^www.example.com/hello/([^.]+) http://www.example.com/hello.php?user=$1
flaskapp
view.py @url('/hello/<user>') def hello(user): return 'hello'+user
數據庫定義以下post
table user ( name varchar() primary , password varchar() );
url資源定位符url
/user/<name>/
什麼是CRUD
CRUD 是 Create Read Update Delete 的縮寫,即咱們中文所說的數據庫的增刪查改
CRUD分別對應http協議的四種方法,code
C <--> post R <--> get U <--> put D <--> delete