![](/img/trans.png)
[英]Wamp Server 3.0.6 working fine as localhost, but not on network
[英]Php Script not working on Wamp Localhost but working fine on remote server
當我在localhost上打開index.php
時 - 顯示完整或php錯誤的頁面,如(unidentified variable等) ,網頁根本不起作用。 但是完全相同的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.
請試試這個:
當我在localhost上打開index.php時 - 顯示完整或php錯誤的頁面,例如(unidentified variable等)
您的localhost配置為顯示所有錯誤或處於開發模式,並且您的服務器處於生產模式,通常僅顯示致命錯誤
並且網頁根本不起作用。 但是完全相同的php文件在遠程服務器上工作(例如Godaddy)
有很多原因它是在你的服務器上工作但不在你的本地主機中,其中一些是...... 1. PHP擴展在你的服務器中啟用但在你的localhost中沒有。 2.不同的PHP版本? 3. php.ini設置
嘗試運行phpinfo(); 在您的服務器和本地主機中都有功能。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.