2013-12-15 144 views
0

我的代码如下,我得到一个错误“解析错误:语法错误,意外'CACHE_TIME'(T_STRING)在F:\ xampp \ htdocs \第49行的intopia \ settings.inc.php“。解析错误:语法错误,意外'CACHE_TIME'(T_STRING)在

任何人都可以帮助我,请不要我在PHP新。

<?PHP 
/** 
* Copyright 2010 Intopia.eu, All rights reserved. 
* Web: http://www.intopia.eu 
* File: STOCK parameters 
*/ 
if (preg_match("/.inc.php/i", $_SERVER['PHP_SELF'])) 
{ 
    echo "<html>\r\n<head>\r\n<title>Forbidden 403</title>\r\n</head>\r\n<body><h3>Forbidden 403</h3>\r\nThe document you are requesting is forbidden.\r\n</body>\r\n</html>"; 
    exit; 
} 

////////////////////////////////////////////// 
// DATABASE 
// Comment: If you want add more parameters to database parameters, 
// then change file "classes/sql.class.php" 
////////////////////////////////////////////// 

//Database type - REQUIRED MYSQLI 
define ("DB_TYPE", "mysqlt"); 

define ("DB_SERVER", "localhost"); 
define ("DB_DATABASE", "intopia"); 

// User must be next rights: 
// ADD/UPDATE/DELETE/ALTER/CREATE VIEW/DROP VIEW 
define ("DB_USERNAME", "root"); 
define ("DB_PASSWORD", ""); 

//Table prefix in database 
#Example: int_ 
define ("PREFIX", "abk_"); 

////////////////////////////////////////////// 
// STORE LOCATIONS 
////////////////////////////////////////////// 

#Example: http://www.intopia.eu/ 
define ("PATH_URL", "http://localhost/intopia/"); 

#Example: /data/main/domain/ 
define ("PATH_MAIN", "F:\xampp\htdocs\intopia\"); 

////////////////////////////////////////////// 
// CACHE 
// Comment: Database cache time and cache location 
////////////////////////////////////////////// 

define ("CACHE_TIME", "30"); 
define ("CACHE_URL", PATH_MAIN . "cache/"); 

////////////////////////////////////////////// 
// Comment: Date and time format (PHP & Javascripts) 
////////////////////////////////////////////// 

define ("DATE_FORMAT", "d.m.Y"); //PHP scripts 
define ("DATE_FORMAT_JS", "dd.mm.yyyy"); //Javascripts 

define ("TIME_FORMAT", "H:i"); //PHP scripts 
define ("TIME_FORMAT_JS", "hh:mm"); //Javascripts 

////////////////////////////////////////////// 
// VIEW LOCK 
// Comment: How long time view locked in minutes 
////////////////////////////////////////////// 

define ("VIEW_LOCKED_TIME", "5"); 

////////////////////////////////////////////// 
// FILE UPLOAD AND LOCATION 
////////////////////////////////////////////// 

//How big can be file on upload 1 000 000 = 1 MB 
define ("UPLOAD_FILE_MAX_SIZE", "4000000"); 

//Delete uploaded file permanently or let to uploaded catalog 
define ("DELETE_UPLOAD_PERMANENTLY", true); 

//Stock upload file location 
define ("DOCUMENT_PATH_MAIN", PATH_MAIN."document/"); 

?> 
+1

语法突出显示将其清除。 – SirDarius

回答

2
define ("PATH_MAIN", "F:\xampp\htdocs\intopia\"); 

你需要躲避最后一个反斜杠,一个关闭的引号之前。

更改它,所以它成为

define ("PATH_MAIN", "F:\xampp\htdocs\intopia\\"); 
0

请使用\下面一行

define ("PATH_MAIN", "F:\xampp\htdocs\intopia\\"); 
2
define ("PATH_MAIN", "F:\xampp\htdocs\intopia\"); 

所有的反斜杠必须用双引号字符串进行转义:

define ("PATH_MAIN", "F:\\xampp\\htdocs\\intopia\\"); 
相关问题