Laravel one-click installation and access exceptions-php Tutorial

Source: Internet
Author: User
Tags parse error php syntax error
Laravel one-click installation and access exceptions recently, when I was studying the laravel framework, when I downloaded and installed the laravel one-click installation package and deployed it locally, the following error was reported during access initialization. I have not changed the code.
Parse error: syntax error, unexpected T_CLASS, expecting T_STRING or T_VARIABLE or '$' in D: \ WWW \ laravel \ public \ index. php on line 50

I haven't found the cause for a long time. I hope laravel can give me some advice. thank you again!


Reply to discussion (solution)

This is a php syntax error. it has nothing to do with laravel.
It is impossible to use composer for installation. What is one-click installation?

Let's take a look at his php version requirements and your php version.


This is the laravel structure directory that does not need to be installed.

This is a php syntax error. it has nothing to do with laravel.
It is impossible to use composer for installation. What is one-click installation?




Hello! I downloaded laravel5 and used it directly without installation. The operation shown in my description.

The error is displayed in Row D: \ WWW \ laravel \ public \ index. php 50.
Then you can paste the first 50 lines of D: \ WWW \ laravel \ public \ index. php to see it.

Let's take a look at his php version requirements and your php version.



I also tested several php versions. I really don't know this syntax error. what's wrong? I'm depressed!

The error is displayed in Row D: \ WWW \ laravel \ public \ index. php 50.
Then you can paste the first 50 lines of D: \ WWW \ laravel \ public \ index. php to see it.



Here, let's take a look.

What is your php version?

What is your php version?



I am using phpstudy. The current version is apache + php5.3n. In other versions, I switched to 5.4 + 5.5 + and tested it. the problem persists. my framework was officially downloaded, but I don't know if there is any problem.

Laravel 5.0 requires PHP version> = 5.4
Laravel 5.1 requires PHP version> = 5.5.9

Your 50th rows have the following internal attributes: class, which is only available in php 5.5.

Laravel 5.0 requires PHP version> = 5.4
Laravel 5.1 requires PHP version> = 5.5.9

Your 50th rows have the following internal attributes: class, which is only available in php 5.5.



So let me switch to the latest version. thank you for your prompt.

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.