我有一個codeigniter項目的源代碼。在config.php文件中有一個點在基地網址。基地網址代碼點
代碼:
$config['base_url'] = 'http://codeigniter-ajaxcrud.local/';
什麼是基本網址中使用此點的目的是什麼?
我有一個codeigniter項目的源代碼。在config.php文件中有一個點在基地網址。基地網址代碼點
代碼:
$config['base_url'] = 'http://codeigniter-ajaxcrud.local/';
什麼是基本網址中使用此點的目的是什麼?
所以實際上他們已經在本地機器上創建了虛擬主機。
您也可以在本地機器上創建虛擬主機,請查看下面的示例,以便您可以簡單理解它。
如果您使用的是xampp,請打開此文件,並在頁面末尾添加此行。
C:\ XAMPP的\ apache的\的conf \額外\的httpd-vhosts.conf
<VirtualHost codeigniter-ajaxcrud.local:80>
DocumentRoot "C:/xampp/htdocs/codeigniter-ajaxcrud"
ServerName codeigniter-ajaxcrud.local
ServerAlias www.codeigniter-ajaxcrud.local
<Directory "c:/xampp/htdocs/codeigniter-ajaxcrud">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all Granted
</Directory>
</VirtualHost>
一旦你做到了這一點笨添加,ajaxcrud.local在hosts文件。 該文件將位於窗口下方的位置。
驅動程序的/ etc /主機
在頁面的末尾添加下面一行。
127.0.0.1 codeigniter-ajaxcrud.local
一旦你完成了這個,請保存所有文件並重新啓動apache服務器。 比這個主機會工作。
謝謝..什麼會是在瀏覽器中的url看起來應該像這樣? .http:// localhost/codeigniter -ajax-crud/ –
它將會是'http:// codeigniter -ajaxcrud.local /' –
你可以創建自己的名字,就像'http:// jahidpathan.dev /' –
可能是虛擬主機 –