Fw: [問題] html 的 frameset

看板Linux作者 (非常念舊)時間9年前 (2014/12/27 16:52), 9年前編輯推噓2(205)
留言7則, 3人參與, 最新討論串1/1
※ [本文轉錄自 Python 看板 #1KdaG3ud ] 作者: gn00618777 (非常念舊) 看板: Python 標題: [問題] html 的 frameset 時間: Sat Dec 27 13:30:39 2014 ㄧ個 index.html ,裡面有 frameset tag,分成三區塊,這三個區塊在 index.html 裡分別代表其他三份 html,例子如下: <frameset cols="20%,80%"> <frameset rows="30%,70%"> <frame src="overview-frame.html" name="packageListFrame"> <frame src="allclasses-frame.html" name="classListFrame"> </frameset> <frame src="overview-summary.html" name="classFrame"> 我在 linux 下寫一個 script test.py: @app.route("/") def hello(): return "Hello World!" @app.route("/report") def view_report(): url_for('static', filename='report/flexmonkey/html/') return send_from_directory('static', 'report/flexmonkey/html/index.html') 所有html都放在 report/flexmonkey/html/ 底下,在linux底下 啟動 test.py server 程式 客戶端瀏覽器無法載入其他 html 127.0.0.1 - - [13/Sep/2012 11:01:25] "GET /overview-frame.html HTTP/1.1" 404 - 127.0.0.1 - - [13/Sep/2012 11:01:25] "GET /allclasses-frame.html HTTP/1.1" 404 - 127.0.0.1 - - [13/Sep/2012 11:01:25] "GET /overview-summary.html HTTP/1.1" 404 請問這個在 test.py 要怎麼寫呢? 謝謝。 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 61.220.220.235 ※ 文章網址: http://www.ptt.cc/bbs/Python/M.1419658243.A.E27.html ※ 發信站: 批踢踢實業坊(ptt.cc) ※ 轉錄者: gn00618777 (60.251.223.31), 12/27/2014 16:52:48 : ※ 編輯: gn00618777 (60.251.223.31), 12/27/2014 16:53:43 ※ 編輯: gn00618777 (60.251.223.31), 12/27/2014 16:54:32

12/28 03:13, , 1F
不懂python@k,但看log,要不要試試在index.html裏,f
12/28 03:13, 1F

12/28 03:13, , 2F
rame src 的檔案加上路徑?
12/28 03:13, 2F

12/28 20:11, , 3F
QQ
12/28 20:11, 3F

12/28 22:23, , 4F
無效,我試了好幾天了= =,flask好少人討論唷
12/28 22:23, 4F

12/29 21:51, , 5F
加一個 route("/<path:filename>")
12/29 21:51, 5F

12/29 21:51, , 6F
之後用 filename 去拿檔?
12/29 21:51, 6F

01/13 22:03, , 7F
C大好,我已經解決了,PO在python板 :)
01/13 22:03, 7F
文章代碼(AID): #1KddDYwS (Linux)