Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/8.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
在firefox和Chrome中运行php项目时出错_Php_Macos_Safari_Xampp - Fatal编程技术网

在firefox和Chrome中运行php项目时出错

在firefox和Chrome中运行php项目时出错,php,macos,safari,xampp,Php,Macos,Safari,Xampp,我已经创建了一个php项目。我正在使用XAMPP。当我运行登录页面时,成功登录后,它会将我重定向到一个名为 http://localhost/xyx.php 但是在firefox中,它将我重定向到 http://localhost/localhost/xyx.php 不过,在safari中,同样的功能也可以正常工作。在成功验证后,我使用以下代码行重定向用户: header('Location: http://localhost/xyx.php'); 有人能告诉我可能是什么问题吗 这将足以

我已经创建了一个php项目。我正在使用XAMPP。当我运行登录页面时,成功登录后,它会将我重定向到一个名为

http://localhost/xyx.php
但是在firefox中,它将我重定向到

 http://localhost/localhost/xyx.php
不过,在safari中,同样的功能也可以正常工作。在成功验证后,我使用以下代码行重定向用户:

header('Location: http://localhost/xyx.php');

有人能告诉我可能是什么问题吗

这将足以重定向到xyz.php

header('Location: xyx.php');

请发布相关的PHP。你在其他浏览器中也尝试过相同的吗?@YogeshSuthar:刚刚在Chrome中尝试过。它也有类似于firefox的问题@user1247412您是否尝试过该解决方案。