我正在和我的客戶一起做一個專案。我主要做前端作業,所以我不太明白這里出了什么問題。
我們獲得了一個預構建應用程式的白標許可證,我們在本地主機上對其進行了徹底的重新設計和重新設計(我在 mac 上使用 MAMP)。該應用程式在那里運行良好,沒有任何問題。
當我嘗試將我的應用程式傳輸到我的主機服務器時,它不會加載。 當我將檔案放在那里并故意將其鏈接到錯誤的頁面時,它不會顯示未找到和此類錯誤,該頁面只是空白
托管服務器和東西可以作業,如果我將隨機 index.html 檔案放在同一個檔案夾中,它將顯示出來。
我的程序是,將所有資料庫內容(MySQL)從一個 PHPmyadmin 復制到另一個。
我為此創建了一個具有完全訪問權限的新資料庫和用戶。
使用檔案管理器并上傳壓縮檔案并將其解壓縮到我的服務器上。
現在codeigniter部分有它需要鏈接到的代碼部分,我需要第一次編輯它,否則它在我的本地主機上不起作用。
代碼是這樣的。
/*
|--------------------------------------------------------------------------
| Base Site URL
|--------------------------------------------------------------------------
|
| URL to your CodeIgniter root. Typically this will be your base URL,
| WITH a trailing slash:
|
| http://example.com/
|
| If this is not set then CodeIgniter will try guess the protocol, domain
| and path to your installation. However, you should always configure this
| explicitly and never rely on auto-guessing, especially in production
| environments.
|
*/
public $baseURL = 'http://localhost:8888/hr-prw';
我也有一個databse.php,它有這些代碼行。
/**
* The directory that holds the Migrations
* and Seeds directories.
*
* @var string
*/
public $filesPath = APPPATH . 'Database/';
/**
* Lets you choose which connection group to
* use if no other is specified.
*
* @var string
*/
public $defaultGroup = 'default';
/**
* The default database connection.
*
* @var array
*/
public $default = [
'DSN' => 'mysql:host=localhost;dbname=root',
'hostname' => 'localhost',
'username' => 'root',
'password' => 'root',
'database' => 'root',
'DBDriver' => 'MySQLi',
'DBPrefix' => '',
'pConnect' => true,
'DBDebug' => (ENVIRONMENT !== 'production'),
'cacheOn' => false,
'cacheDir' => '',
'charset' => 'utf8',
'DBCollat' => 'utf8_general_ci',
'swapPre' => '',
'encrypt' => false,
'compress' => false,
'strictOn' => false,
'failover' => [],
'port' => 3306,
];
現在這是在我的 MAMP 上本地運行的所有內容,并且運行良好。
對于主機,我創建了一個子域。假設我的檔案位置和資料庫資訊如下所示。
testnet.domain.hr/hr.prw
資料庫資訊: 用戶名:database_root 密碼:databaseroot 資料庫名稱:database_root
現在我很想知道當我輸入時我需要把什么放在哪里才能完成這項作業。
https://testnet.domain.com/hr-prw/
當我去檢查網路時,它顯示一個帶有錯誤 500 的空白頁。
I tried to put the info in those two tables and edit in various different combinations but I had no luck, thank you a lot for your help.! If you need any more info just ask.
uj5u.com熱心網友回復:
發現問題,在我的主機 PHP 版本上沒有啟用 INTL,這解決了所有問題。
uj5u.com熱心網友回復:
public $baseURL = 'http://localhost:8888/hr-prw'像這樣將值更改為您自己的域或專案根位置
public $baseURL = 'http://example.com/hr-prw';
uj5u.com熱心網友回復:
您可以使用 nginx 或 apache 從服務器系結,然后從 http://localhost:8888/hr-prw 設定
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/407432.html
標籤:
