原创 php實現下載文件(瀏覽器不直接打開)

test.html:<a href="do.php?ac=dw">下載12.jpg</a> do.php:if($_GET['ac']=='dw') { $file = './12.jpg'; //文件路徑 $filename = b

原创 關於mysql外鍵

首先要先明確mysql外檢的作用,其實很簡單,就是建立主表和從表的強制約束。看個例子: 創建主表: create table class ( id int(10) unsigned not null primary