xampp代码不工作wamp服务器无法正常工作

时间:2013-02-21 07:00:18

标签: php

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

<?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/');   
?>

1 个答案:

答案 0 :(得分:0)

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

if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN'){
   define("PATH_SEPARATOR1", ";");  //you can't use `PATH_SEPARATOR`
}else{
   define("PATH_SEPARATOR1", ":");
}