【发布时间】:2014-11-29 05:06:20
【问题描述】:
当我在 localhost 上打开 index.php 时 - 页面显示完整或 php 错误,例如 (未识别的变量等) 并且网页根本无法运行.然而完全相同的 php 文件在远程服务器上工作(例如 Godaddy)
index.php 文件以
<?
require_once ('templates/header.php');
?>
<div class='grid_12'>
<table>
<div id="form" > and son on....
header.php 文件以:
<?php
session_start();
include('classes/secure.class.php'); // include the class
$secure = new secure(); // load the class
$secure->secureGlobals(); // run the main class function
require_once ('config.php');
require_once ('functions.php');
require_once ('templates/commonheader.php');
require_once ('lang.php');
header('Content-type: text/html; charset=$charset');
?> and so on...
我认为 localhost 中的 PHP SESSIONS 存在问题。我不知道为什么相同的脚本在 localhost 中不起作用。任何帮助表示赞赏。
J.
【问题讨论】:
-
我认为你的服务器是开发环境并显示所有警告或错误,而你的本地主机没有显示
标签: php session localhost wamp