我有一個想要在我的 apache 服務器上運行的游戲。
當我嘗試查看游戲活動實體時,我重定向到已上傳游戲的 index.html 檔案。
這是 view.php 中的代碼:
$fp = get_file_packer('application/zip');
$dest = $CFG->dirroot.'/mod/game/games/'.$file->get_filename().'_extracted';
// Extract the stored_file instance into this destination.
$files = $fp->extract_to_pathname($file, $dest);
$fullurl = moodle_url::make_file_url('/mod/game/games/',$file->get_filename().'_extracted/index.html');
redirect($fullurl);
這是統一網路 gl 構建的 .htaccess 檔案:
IfModule mod_mime.c
RemoveType .gz
AddEncoding gzip .gz
AddType application/octet-stream .data.gz
AddType application/wasm .wasm.gz
AddType application/javascript .js.gz
AddType application/octet-stream .symbols.json.gz
AddType applicationwasm .wasm
AddEncoding gzip .unityweb
IfModule
重定向后游戲根本無法加載,并且控制臺中出現一個錯誤,即:
'加載資源失敗:服務器回應狀態為 500(內部服務器錯誤)'
uj5u.com熱心網友回復:
我注意到我的統一專案的發布設定中沒有啟用減壓回退,這解決了我的問題。
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/427915.html
標籤:阿帕奇 压缩包 穆勒 unity-webgl
下一篇:需要條形圖適合Section()
