Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/86.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
我可以´;t通过本地网络从Android手机访问我的整个本地网络_Android_Html_Codeigniter_Xampp_Localhost - Fatal编程技术网

我可以´;t通过本地网络从Android手机访问我的整个本地网络

我可以´;t通过本地网络从Android手机访问我的整个本地网络,android,html,codeigniter,xampp,localhost,Android,Html,Codeigniter,Xampp,Localhost,我一直在寻找一个类似的问题,但我找不到和我有同样问题的人 我正在使用XAMPPV3.2.2。我可以用Chrome从我的Android手机访问我的本地网络(它与我的笔记本电脑连接到同一个网络),只需输入我的笔记本电脑IPV4地址,然后输入/index.php/controller/id(因为我使用的是Codeigniter框架)。因此,我的Android手机的Chrome浏览器中的URL类似于: 192.168.xx.xx/index.php/principal/index 在这一点上,我可以访问

我一直在寻找一个类似的问题,但我找不到和我有同样问题的人

我正在使用XAMPPV3.2.2。我可以用Chrome从我的Android手机访问我的本地网络(它与我的笔记本电脑连接到同一个网络),只需输入我的笔记本电脑IPV4地址,然后输入
/index.php/controller/id
(因为我使用的是Codeigniter框架)。因此,我的Android手机的Chrome浏览器中的URL类似于:

192.168.xx.xx/index.php/principal/index

在这一点上,我可以访问的主要和管理网页(背景图像加载,也引导和css)。但这里是一些问题开始出现的地方

其中之一是主网页中的图像未加载。正如我所说,背景图像加载没有任何问题,但画廊的图像没有加载

另一个问题出现在我尝试使用管理员网页中的一些功能时,如“删除照片”或“上载图像”。当y按下提交按钮时,例如“上传图像”表单(这里是html):


选择:
描述:
我把代码只是为了举例说明,它在我的笔记本电脑上运行良好,我可以上传照片,删除它们,创建新的类别等等。但正如我之前所说,当我尝试在手机中执行这些操作并按下提交按钮时,浏览器会显示此页面->

所以,我希望有人有同样的问题,可以给我一个解决方案


谢谢

我终于解决了这个问题

在Codeigniter Config.php文件中,我更改:

所以现在我给CodeIgniter动态的服务器IP,现在移动设备可以从服务器IP而不是像以前的“localhost”那样从自己搜索图像

<form action="http://localhost/index.php/principal/subir_foto" enctype="multipart/form-data" method="post" accept-charset="utf-8">                                                  
                <label  class='control-label'>Seleccionar:</label>
                <input id="img" required="true" type='file' name='imagen'/>                 
            <div class='input-group'>                                   
                <label class='control-label'>Descripción:</label>       
                <input type='text' name='alt' placeholder='Descripción'>
            </div>   
            <div class='input-group'>
                <input type='submit' name='agregar' value="Agregar">
            </div>             
           </form>
$config['base_url'] = 'http://localhost/';
$localIP = getHostByName(getHostName());
$config['base_url'] = 'http://'.$localIP.'/';