Parse error: syntax error, unexpected '(' in D:\xampp3\xampp\htdocs\contact.php on line 10

I have a problem with my code here. I'm making a simple "Contact us" via html / PHP. But i'm new to all this, and learning it from step to step. So thats why i've come here. I get this error: Parse error: syntax error, unexpected '(' in D:xampp3xampphtdocscontact.php on line 10 and here is the code: <i><?php include 'core/init.php'; include 'includes/ov

解析错误:语法错误,意外的'('在第10行D:\ xampp3 \ xampp \ htdocs \ contact.php中

我的代码在这里有问题。 我正在通过html / PHP做一个简单的“联系我们”。 但我对这一切都很陌生,并逐步学习。 这就是为什么我来到这里。 我得到这个错误:解析错误:语法错误,意想不到的'('在第10行D: xampp3 xampp htdocs contact.php中,这里是代码: <i><?php include 'core/init.php'; include 'includes/overall/header.php'; if (empty($_POST) === false) { $name = $_POST ['name']

Why don't PHP attributes allow functions?

I'm pretty new to PHP, but I've been programming in similar languages for years. I was flummoxed by the following: class Foo { public $path = array( realpath(".") ); } It produced a syntax error: Parse error: syntax error, unexpected '(', expecting ')' in test.php on line 5 which is the realpath call. But this works fine: $path = array( realpath("

为什么PHP属性不允许使用函数?

我对PHP相当陌生,但我多年来一直使用类似的语言进行编程。 我被以下内容淹没了: class Foo { public $path = array( realpath(".") ); } 它产生了一个语法错误: Parse error: syntax error, unexpected '(', expecting ')' in test.php on line 5 ,这是realpath调用Parse error: syntax error, unexpected '(', expecting ')' in test.php on line 5 。 但是,这工作

Parse error: syntax error, unexpected '(', expecting ',' or ';' in

I am recieveing the following parse error: Parse error: syntax error, unexpected '(', expecting ',' or ';' in H:ProgramsUSBWebserver v8.58.5rootoopforumfuncregister.class.php on line 7 which relates to the following line of code in my class: private $random_name = rand(1000,9999).rand(1000,9999).rand(1000,9999).rand(1000,9999); I can not see why this line of code wou

解析错误:语法错误,意外的'(',期待','或';'in

我收到以下解析错误: 解析错误:语法错误,在第7行的H: Programs USBWebserver v8.5 8.5 root oopforum func register.class.php中意外的'(',期待','或';' 它与我的课程中的以下代码行相关: private $random_name = rand(1000,9999).rand(1000,9999).rand(1000,9999).rand(1000,9999); 我看不到为什么这行代码会导致解析错误? 这是一些周围的代码: class register{ public $p

php unexpected ')' parse error

Possible Duplicate: Can I use a function to return a default param in php? Using function result as a default argument in PHP function I am trying to set default value for a function. I want the function $expires default value to be time() + 604800 . I am trying public function set($name,$value,$expires = time()+604800) { echo $expires; return setcookie($name, $value, $expires);

PHP意外')'解析错误

可能重复: 我可以使用函数来返回一个默认的参数在PHP中? 在PHP函数中使用函数结果作为默认参数 我正在尝试为函数设置默认值。 我希望函数$expires默认值是time() + 604800 。 我在尝试 public function set($name,$value,$expires = time()+604800) { echo $expires; return setcookie($name, $value, $expires); } 但是我得到一个错误。 第38行的/var/www/running/8ima/lib/cookies.lib.php中解析错

Why when add <?xml version="1.0" encoding="utf

I am developing a simple webpage at hostgator.com. I have the standard headers, but when I add the following line: <?xml version="1.0" encoding="utf-8"?> the page does not work. I would like why. This is the full header: <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1 /DTD/xhtml1-strict.dtd"> &l

为什么添加<?xml version =“1.0”encoding =“utf

我正在开发一个简单的网页hostgator.com。 我有标准标题,但是当我添加以下行时: <?xml version="1.0" encoding="utf-8"?> 该页面不起作用。 我想为什么。 这是完整的标题: <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1 /DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="es" xml:

STRING error

While configuring custom fields in mantis i got this error message , any idea Parse error: syntax error, unexpected T_STRING in C:wampwwwMyProjcustom_strings_inc.php on line 3 The code is <?php if( lang_get_current() == 'german' ) { $defect_impact = 'Defect Impact'; #// German translation of Defect Impact $defect_type = 'Defect Type'; #// German translation of Defect Type $ph

STRING错误

在螳螂配置自定义字段时,我得到了这个错误消息,任何想法 解析错误:语法错误,第3行中的C: wamp www MyProj custom_strings_inc.php中出现意外的T_STRING 代码是 <?php if( lang_get_current() == 'german' ) { $defect_impact = 'Defect Impact'; #// German translation of Defect Impact $defect_type = 'Defect Type'; #// German translation of Defect Type $phase_of_origin = ’Phase Of Orig

Troubleshooting "parse error, unexpected '>'" error

I am getting this error that is reading Parse error: parse error, unexpected '>' in C:wampwwwabout.php on line 11 Here is my code: <?php session_start(); include ("include/header.php"); if (!isset($_SESSION['name'])){; header("Location:includeindex.php"); exit; } else{ TopNavigation("about Me -ECA236","About Me",$_SESSION['name']); echo "<p>Here is a little about me. I

解决“解析错误,意外的'>'”错误

我正在阅读这个错误 解析错误:解析错误,在第11行的C: wamp www about.php中出现意外的'>'' 这是我的代码: <?php session_start(); include ("include/header.php"); if (!isset($_SESSION['name'])){; header("Location:includeindex.php"); exit; } else{ TopNavigation("about Me -ECA236","About Me",$_SESSION['name']); echo "<p>Here is a little about me. I am a mother of twin gi

Syntax error, unexpected T

mysql_connect("localhost","root",""); mysql_select_db("hitnrunf_db"); $result=mysql_query("select * from jos_users INTO OUTFILE 'users.csv' FIELDS ESCAPED BY '""' TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY 'n' "); header("Content-type: text/plain"); header("Content-Disposition: attachment; filename=your_desired_name.xls"); header("Content-Transfer-Encoding: binary"); header("Pragma:

语法错误,意外的T

mysql_connect("localhost","root",""); mysql_select_db("hitnrunf_db"); $result=mysql_query("select * from jos_users INTO OUTFILE 'users.csv' FIELDS ESCAPED BY '""' TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY 'n' "); header("Content-type: text/plain"); header("Content-Disposition: attachment; filename=your_desired_name.xls"); header("Content-Transfer-Encoding: binary"); header("Pragma:

Interpolation (double quoted string) of Associative Arrays in PHP

When interpolating PHP's string-indexed array elements (5.3.3, Win32) the following behavior may be expected or not: $ha = array('key1' => 'Hello to me'); print $ha['key1']; # correct (usual way) print $ha[key1]; # Warning, works (use of undefined constant) print "He said {$ha['key1']}"; # correct (usual way) print "He said {$ha[key1]}"; # Warning, works (use of undefined consta

PHP中关联数组的插值(双引号字符串)

当插入PHP的字符串索引数组元素(5.3.3,Win32)时,可能会出现以下行为: $ha = array('key1' => 'Hello to me'); print $ha['key1']; # correct (usual way) print $ha[key1]; # Warning, works (use of undefined constant) print "He said {$ha['key1']}"; # correct (usual way) print "He said {$ha[key1]}"; # Warning, works (use of undefined constant) print "He said $ha['key1']"; # Error, unexpe

Syntax error unexpected T

I am getting the following error syntax error, unexpected T_CONSTANT_ENCAPSED_STRING on this line $this->email->subject($this->core_model->companyDetails()->coreCompanyName 'User Registration Confirmation'); have I make a mistake with the '' and "" ? I have also past the name as $data can I include this in the subject instead of the model call? You pro

语法错误意外T

我在这行$this->email->subject($this->core_model->companyDetails()->coreCompanyName 'User Registration Confirmation');获得以下错误syntax error, unexpected T_CONSTANT_ENCAPSED_STRING $this->email->subject($this->core_model->companyDetails()->coreCompanyName 'User Registration Confirmation'); 我'' and ""犯了错误吗? 我也通过$ data的