I'm doing a php script for school and I've got an error with these lines. // calculate total $total_price = $crystal_price * $item_numbers + $postage_price; if ($coupon_code=="FREEPOST" && $total_price >= 1000 ) $postage_price = 0 ; && $total_cost = $item_numbers * $crystal_price else if ($coupon_code=="HALFPOST" && $total_price >= 400 ) $postage_price = $po
我正在为学校做一个php脚本,并且我在这些行中遇到了一个错误。 // calculate total $total_price = $crystal_price * $item_numbers + $postage_price; if ($coupon_code=="FREEPOST" && $total_price >= 1000 ) $postage_price = 0 ; && $total_cost = $item_numbers * $crystal_price else if ($coupon_code=="HALFPOST" && $total_price >= 400 ) $postage_price = $postage_price * 0.5 ; &a
I get this error in my PHP code: Parse error:syntax error, unexpected T_BOOLEAN_AND in /home/a1825511/public_html/register.php on line 23 This is my code: if (strlet($getemail) >= 7) && (strstr($getemail, "@")) && (strstr($getemail, ".")) { What am I doing wrong? By the way that end bracket does connect later in my code, so all good there. 你失去了一个之后if if ((strlet($
我在我的PHP代码中遇到这个错误: Parse error:syntax error, unexpected T_BOOLEAN_AND in /home/a1825511/public_html/register.php on line 23 这是我的代码: if (strlet($getemail) >= 7) && (strstr($getemail, "@")) && (strstr($getemail, ".")) { 我究竟做错了什么? 顺便说一句,末端括号在我的代码后面连接,所以一切都很好。 你失去了一个之后if if ((strlet($getemail) >= 7) &&
I'm new to this PHP and MySQL world. I've been given an assignment about simple system. But i got this error and i don't know how to fix it. Hope you guys can help me. <?php include ("config.php"); mysql_select_db("dbpelanggan") or die(mysql_error()); echo "Sambungan ke pangkalan data berjaya!"; $result = mysql_query("SELECT * F
我是这个PHP和MySQL世界的新手。 我被赋予了一个关于简单系统的任务。 但是,我得到了这个错误,我不知道如何解决它。 希望你们能帮助我。 <?php include ("config.php"); mysql_select_db("dbpelanggan") or die(mysql_error()); echo "Sambungan ke pangkalan data berjaya!"; $result = mysql_query("SELECT * FROM pelanggan") or die(mysql_error());
This question already has an answer here: PHP parse/syntax errors; and how to solve them? 13 answers "$dataSet->msg" is not a function but a property, and you need to call it like this. <a href='message.php?msg=".$dataSet->msg."'> // but wont work as it is private or use the method call as in the below line <a href='message.php?msg=".$dataSet->welcomeMessage()
这个问题在这里已经有了答案: PHP解析/语法错误; 以及如何解决它们? 13个答案 “$ dataSet-> msg”不是一个函数,而是一个属性,你需要像这样调用它。 <a href='message.php?msg=".$dataSet->msg."'> // but wont work as it is private 或者像下面一行那样使用方法调用 <a href='message.php?msg=".$dataSet->welcomeMessage()."'> 好吧,让supoose定义$dataSet ,并且它有所有必需的方法。 那
I'm sorry if this has been mentioned many times in the thread but I just want to ko some answer. Can someone tell me how I got an error like this Parse error: syntax error, unexpected ';' in C:xampphtdocscreate.php on line 8 Here is my code: <?php mysql_connect("localhost","root"); mysql_select_db("comment"); if(isset($_POST['submit'])) ( $Name = $_POST['name']
对不起,如果这已在线程中多次提到,但我只想要一些答案。 有人能告诉我我是如何得到这样的错误吗? 解析错误:语法错误,意外';' 在第8行的C: xampp htdocs create.php中 这是我的代码: <?php mysql_connect("localhost","root"); mysql_select_db("comment"); if(isset($_POST['submit'])) ( $Name = $_POST['name']; $Email = $_POST['email']; mysql_query("INSERT IN
These lines are causing a syntax/parse error, and I'm not sure how to fix it. I'm pretty sure it's either the <?php and ?> tags, or the single quotes. Any ideas? $data = '<?php $title = "'. $name. '"; $keywords = "'. $title. ','. $developer. '"; $description = "How to install '. $title. ' for PC and Mac."; include('templates/modheader.php'); include('t
这些行导致语法/解析错误,我不知道如何解决它。 我很确定它是<?php和?>标记或单引号。 有任何想法吗? $data = '<?php $title = "'. $name. '"; $keywords = "'. $title. ','. $developer. '"; $description = "How to install '. $title. ' for PC and Mac."; include('templates/modheader.php'); include('templates/modfooter.php'); ?>'; 提前致谢。 include('templates/modhead
recently I have gotten this error: Parse error: syntax error, unexpected ')' in /home/aps/public_html/wp-content/themes/Valor/functions.php on line 54 I have looked at this line and found no problems, and ran it through a PHP error code finder. Just to be sure, I copied the code from the functions.php I have saved on my computer into the editor and it still happens. I am using wor
最近我得到这个错误: Parse error: syntax error, unexpected ')' in /home/aps/public_html/wp-content/themes/Valor/functions.php on line 54 我看过这一行,发现没有问题,并通过PHP错误代码查找器运行它。 可以肯定的是,我将我在计算机上保存的functions.php中的代码复制到编辑器中,但仍然发生。 我使用wordpress和Valor主题。 发生时我一直在编辑这些行: if ( function_exists( 'add_theme_support'
so, i got this error in firebug after trying to login to my html page in localhost. i'm trying to build a login page right now. using php and extjs 3.2.1 this is the error on the first of html line DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd" my php code using php5.3.10 <?php ob_start(); $host="localhost"; // Host na
所以,我试图登录到本地主机的html页面后,在萤火虫中出现此错误。 我正试图建立一个登录页面。 使用php和extjs 3.2.1 这是第一个html行的错误 DOCTYPE HTML PUBLIC“ - // W3C // DTD HTML 4.01 // EN”“http://www.w3.org/TR/html4/strict.dtd” 我的php代码使用php5.3.10 <?php ob_start(); $host="localhost"; // Host name $username=""; // Mysql username $password=""; // Mysql password $db_name="my_db
I was trying to place a WordPress menu inside my template file. I found using wp_nav_menu uncomfortable since it outputs markup that is not compatible with my static HTML template. I know I could just use custom menu walker class to modify the markup that wp_nav_menu. But instead, I wanted to just use only the menu name and its corresponding url and place it in my template. For this, I used t
我试图在我的模板文件中放置一个WordPress菜单。 我发现使用wp_nav_menu不舒服,因为它输出的标记与我的静态HTML模板不兼容。 我知道我可以使用自定义菜单walker类来修改wp_nav_menu的标记。 但是,我只想使用菜单名称及其相应的URL并将其放在我的模板中。 为此,我使用此函数来获取菜单的所有属性/属性的数组。 这是由这个函数生成的代码... 我通过使用var_dump()找到了它。 Array ( [0] = WP_Post Object
This question already has an answer here: The 3 different equals 4 answers unexpected error message in php form (SQL syntax error) 3 answers The problem is that you have specified the assignment instead of comparison in the following line: if ($post_title=='' || $post_keywords=='' || $post_content='' || $post_author=='' || $post_summary==''){ Change $post_content='' to $post_conte
这个问题在这里已经有了答案: 3个不同等于4个答案 意外的错误消息在PHP窗体(SQL语法错误)3答案 问题在于你已经在下面一行中指定了赋值而不是比较: if ($post_title=='' || $post_keywords=='' || $post_content='' || $post_author=='' || $post_summary==''){ 将$post_content=''更改$post_content='' $post_content == '' 你的错误在这里$post_content=''如果条件应该是$post_con