PHP syntax exception. let's see what's wrong with me.

Source: Internet
Author: User
Tags php syntax error
PHP syntax error. let's see what went wrong! My code: PHPcode & lt; formaction & quot; action. php & quot; method "post" & gt; & lt; p & gt; account: & lt; inputtype "text" name "username" & gt; & lt; p & gt; & lt; p & gt; password: PHP syntax error. let's see where I got it wrong!
My code:
PHP code
      

Put it on the server. the following message is displayed:
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in C: \ xampp \ htdocs \ index. php on line 16
The first line of code above is 16th lines.

------ Solution --------------------
Echo"

Current time: $ currtimestr

"



Php?>
1. it is best to separate echo from ""
Echo "content ";
2. the content is enclosed by quotation marks, and the HTML code you want to output contains double quotation marks. The PHP interpreter uses quotation marks to determine where the string ends. Therefore ';

?>

------ Solution --------------------
Discussion

An error is returned when I reenter all "".
There are 16 more lines
Html;
Of course, I didn't look at your other code, just this part...

Discussion

Reference:

An error is returned when I reenter all "".
There are 16 more lines

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.