Tag Archives: syntax error

[Solved] Error c2226: syntax error: unexpected ‘lpstr’ type

Question:

1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winbase.h(6132): warning C4229: used mnemonic error: ignore modifier on data
1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\winbase.h(6133): error C2226: syntax error : unexpected “LPSTR” type

Cause: Windows.h contains tchar.h and strsafe.h before Windows.h

Solution: Comment out the statement that contains tchar.h and strsafe.h before Windows.h.

Parse error: syntax error, unexpected end of file in XXXXXXXX

Something similar appears in PHP programs
Parse error: syntax error, unexpected end of file in XXXXXXXX on line xx
The error.
If you find nothing wrong with the SYNTAX of PHP itself. Short tags may be used, such as:
< ?}?>
The solution to this problem is:
You can set short_open_tag = On
in php.ini

———————————————————
What is short_open_TAG?

determines whether the abbreviated form of the code start flag is allowed (< ??> ). If you want to use PHP in conjunction with XML, you can disable this option to embed < ?xml ?> . Otherwise you can output it through PHP, for example: < ?php echo ‘< ?The XML version = “1.0” ‘; ?> . If disabled, you must use the full form of the PHP code start flag (< ?php ?> ).

note: this instruction also affects the abbreviation < ?=, and < ?Echo equivalence. Using this abbreviation requires that the value of short_open_TAG be On.

PHP Parse error: syntax error, unexpected ‘class‘ (T_CLASS), expecting identifier (T_STRING)

Parse error: syntax error, unexpected ‘class’ (T_CLASS), expecting identifier (T_STRING) in D:\phpstudy\WWW\pro\vendor\overtrue\wechat\src\Foundation\Application. php on line 86
[4] ErrorException in Application.php line 86
syntax error: unexpected ‘class’ (T_CLASS), expecting identifier (T_STRING)


*/ class Application extends Container { /** * Service Providers. * * @var array */ protected $providers = [ ServiceProviders\FundamentalServiceProvider::class, ServiceProviders\ServerServiceProvider::class, ServiceProviders\UserServiceProvider::class, ServiceProviders\JsServiceProvider::class, ServiceProviders\OAuthServiceProvider::class, ServiceProviders\MenuServiceProvider::class, ServiceProviders\NoticeServiceProvider::class, ServiceProviders\MaterialServiceProvider::class, ServiceProviders\StaffServiceProvider::class, ServiceProviders\UrlServiceProvider::class,

Call Stack

    in Application.php line 86
    at Error::appShutdown()

Solution:

1: Adjust the php version on it.
2: It is possible that the name of the definition is repeated.