-2

php 代码在 xamp 服务器上工作,但相同的代码在 wamp server.configfile 中不起作用,显示错误这是我的编码

<?php
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN'){
    define("PATH_SEPARATOR", ";");
}else{
    define("PATH_SEPARATOR", ":");
}   
import_request_variables("gP");


define("WELCOME_ADMIN","<span class='adminwelcome'>Welcome to the <br>
    Administrative Console of </span><br><span class='adminlargetitle'>Recipe</span>");
define("SITE_NAME", "www.fff.com");//i am using xamp for php coding.its works  perfectly. but i am put that code to wamp server its showing error

define("SITE_HEADING", "fff");
define("TITLE", "food");
define('SITE_ROOT',  'http://localhost/fff/');
define('DIR_ROOT',   'C:/xampp/htdocs/fff/');   
?>
4

1 回答 1

0

使用此代码,PATH_SEPARATOR是保留变量,您不能将其重用于赋值。

if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN'){
   define("PATH_SEPARATOR1", ";");  //you can't use `PATH_SEPARATOR`
}else{
   define("PATH_SEPARATOR1", ":");
} 
于 2013-02-21T07:06:49.390 回答