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/');
?>
答案 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", ":");
}