繁体   English   中英

更新XAMPP破坏了PHP网页执行

[英]Updating XAMPP broke php web page execution

我使用Windows 10 64位桌面和Windows 10 64位笔记本电脑。 两台计算机上都发生了这种情况。

完全卸载旧版本的XAMPP(在Admin帐户中)后,我重新安装了最新版本(xampp-win32-7.3.1-0-VC15-installer.exe作为具有防火墙和病毒防护功能的Admin管理员)。

我通过在Chrome浏览器中输入localhost /来验证安装,然后XAMPP网页出现在localhost / dashboard上。

然后,我将数据库备份加载到phpMyAdmin 4.8.4中。 然后将页面的备份文件夹复制到htdocs中。

但是现在,在旧版本中正确显示的php网页现在在某些页面(而非全部)上引发此错误。

Warning: require_once(/includes/session.php): failed to open stream: No such file or directory in C:\xampp\htdocs\my_rabbits\my_profile.php on line 1

Fatal error: require_once(): Failed opening required '/includes/session.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\my_rabbits\my_profile.php on line 1

我检查了路径,它们都是正确的-没有拼写错误。 我的include文件夹和单独的my_profile.php页面都位于htdocs中。 这是my_profile.php页面的第1行:

<?php require_once("/includes/session.php"); ?>

这是我的include / session.php代码的样子:

<?php

   session_start();

   function message() {
      if (isset($_SESSION["message"])) {
         $output = "<div class=\"message\">";
         $output .= htmlentities($_SESSION["message"]);
         $output .= "</div>";

         // clear message after use
         $_SESSION["message"] = null;

         return $output;
      }
   }

   function errors() {
      if (isset($_SESSION["errors"])) {
         $errors = $_SESSION["errors"];

         // clear message after use
         $_SESSION["errors"] = null;

         return $errors;
      }
   }

?>

感谢您提供的任何帮助。 我是新手,正在未知水域中航行...

php.ini中的include_path-没有当前路径

include_path = ".;C:\xampp\php\PEAR"

暂无
暂无

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

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