当我index.php在本地主机上打开时,页面显示完整或 php 错误,例如(身份不明的变量等),并且网页根本无法工作。然而,完全相同的 php 文件可以在远程服务器上运行(例如 Godaddy)
文件index.php开头为
<?
require_once ('templates/header.php');
?>
<div class='grid_12'>
<table>
<div id="form" > and son on....
Run Code Online (Sandbox Code Playgroud)
文件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...
Run Code Online (Sandbox Code Playgroud)
我认为PHP SESSIONSlocalhost有问题。我不知道为什么相同的脚本在localhost中不起作用。任何帮助表示赞赏。
J。
小智 5
请尝试这个:
| 归档时间: |
|
| 查看次数: |
3253 次 |
| 最近记录: |