-1

我在 windows vps 上收到此错误消息。

完整的错误信息:

“解析错误:语法错误,第 24 行 C:\Inetpub\vhosts\kayahomesonline.com\httpdocs\configuration.php 中的意外 T_DNUMBER”

我的 configuration.php 内容是:

error_reporting(E_ALL);
ini_set("display_errors", 1);

session_start();

## Set the time for IST
date_default_timezone_set('Europe/Istanbul');
setlocale(LC_ALL, 'turkish');
setlocale(LC_ALL, 'tr_TR.UTF-8');
// setlocale(LC_TIME, 'tr_TR');

$title = "KAYAHOMES YÖNETİM PANELİ";

$baseURL = "https://www.kayahomesonline.com";
$basePath = "C:\Inetpub\vhosts\kayahomesonline.com\httpdocs\";

## JavaScript General Path
$js_path = 'http://script.rezsis.com/js/';
$img_path = 'http://script.rezsis.com/images/';

$version = "0.1";

$baglan = mysql_connect('localhost','datauser','D4t4b4s3*');

if (!$baglan)
    {
        die('Veritabanına bağlanılamadı... Lütfen yetkilinizle irtibata geçin...' . mysql_error());
    }

mysql_select_db('kayahomes_new',$baglan) or header("Location: ../login.php");   
mysql_query("SET NAMES UTF8");

?>

怎么了?这个配置文件在我的旧 Linux VPS 上运行。

4

1 回答 1

0

正如@deceze 指出的那样,字符串并没有在变量中结束$basePath。您需要添加反斜杠以使字符串结束。

所以代码就像

$basePath = "C:\Inetpub\vhosts\kayahomesonline.com\httpdocs\\";
于 2014-11-02T15:32:08.373 回答