简体   繁体   English

ampps 3.8上的Localhost太慢

[英]Localhost is too Slow on ampps 3.8

I am using Ampps 3.8 for localserver and it was working fine at my office. 我在本地服务器上使用Ampps 3.8,在我的办公室工作正常。 It was nice and i could easily change php versions for test purposes. 很好,我可以轻松更改php版本以进行测试。

But when i tried to access localhost or change php versions from my home network, it takes lots of time and many of my assets like css, images etc are not loading. 但是,当我尝试从本地网络访问localhost或更改php版本时,这会花费很多时间,并且我的许多资产(如CSS,图像等)都无法加载。 I am doing a project in Codeigniter and php 7. 我正在Codeigniter和php 7中做一个项目。

details of my configuration are as follows: 我的配置详细信息如下:

$config['base_url'] = 'http://192.168.43.122/projects/neewer';
$config['uri_protocol'] = 'REQUEST_URI';

//db config
$db['default'] = array(
'dsn'   => '',
'hostname' => 'localhost',
'username' => 'root',
'password' => '',
'database' => 'neewer',
'dbdriver' => 'mysqli',
'dbprefix' => '',
'pconnect' => FALSE,
'db_debug' => (ENVIRONMENT !== 'production'),
'cache_on' => FALSE,
'cachedir' => '',
'char_set' => 'utf8',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'encrypt' => FALSE,
'compress' => FALSE,
'stricton' => FALSE,
'failover' => array(),
'save_queries' => TRUE
);

Can someone tell me what i am doing wrong? 有人可以告诉我我在做什么错吗?

Your Configs seems to be correct. 您的配置似乎正确。 Why are you using '192.168.43.122' instead of localhost? 为什么使用“ 192.168.43.122”代替本地主机? most porobably that will be the issue as u said ur system is working fine at your office and not at your home. 最有可能的是,这将是问题所在,因为您说我们的系统在您的办公室而不是在您的家中工作正常。

maybe that ip address will be of your office network. 该IP地址可能是您的办公室网络的IP地址。 Try changing it to your home networks ip address or just to localhost like below code and try again. 尝试将其更改为您的家庭网络ip地址或仅更改为本地主机,如下面的代码,然后重试。

$config['base_url'] = 'http://192.168.43.122/projects/neewer';

to

$config['base_url'] = 'http://localhost/projects/neewer';

Hopefully this will do the trick if the issue is differences in IP Addresses. 如果问题出在IP地址方面,希望可以解决这个问题。 let us know if that doesnt help and if you need any help further. 让我们知道这是否无济于事,以及您是否需要进一步的帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM