你好,提示syntax error, unexpected ':', expecting ',' or ')'是怎么回事呢?
雨
2019-05-26 15:47:42
0
2
5364

[0] ParseError 在 Index.php 第 10 行

语法错误,意外的 ':',期望 ',' 或 ')'

#调用堆栈

在 Index.php 第 10 行

处 Composer\Autoload\includeFile('D:\myphp_www\PHPTuto...')在 ClassLoader.php 第 322 行

at ClassLoader->loadClass('app\index\controller...')

at spl_autoload_call('app\index\controller...')

Controller.php 第 103 行中的 class_exists('app\index\controller...')

Controller.php 第 57 行中的 Controller->controller('index')

在 Dispatch.php 第 118 行中的 Controller->exec()

在 Route.php 第 748 行中的 Dispatch->run()

在 Route->; think\{closure}(object(Request), object(Closure), null)

at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) 在 Middleware.php 中第 206 行

TraceDebug.php 中的中间件->think\{closure}(object(Request)) 第 48 行

TraceDebug->handle(object(Request), object( Closure), null)

位于 Middleware.php 第 206 行中的 call_user_func_array([object(TraceDebug), 'handle'], [object(Request), object(Closure), null])

at Middleware->think\{closure}(object(Request)) in SessionInit.php line 58

at SessionInit->handle(object(Request), object(Closure), null)

at call_user_func_array([object(SessionInit), 'handle'], [object(Request), object(Closure), null]) in Middleware.php line 206

at Middleware->think LoadLangPack.php 第 60 行中的 \{closure}(object(Request))

at LoadLangPack->handle(object(Request), object(Closure), null)

at call_user_func_array( Middleware.php 第 206 行中的 [object(LoadLangPack), 'handle'], [object(Request), object(Closure), null]) 在 Middleware->think\{closure}(object( Request)) 在 CheckRequestCache.php 第 53 行

at CheckRequestCache->handle(object(Request), object(Closure), null)

at call_user_func_array([object(CheckRequestCache), ' middleware.php 第 206 行中的 [object(Request), object(Closure), null])

at Middleware->think\{closure}(object(Request))

在 Middleware.php 第 150 行中的 call_user_func(object(Closure), object(Request))

at Route.php 第 755 行中的中间件->dispatch(object(Request))

at Route->dispatch(object(Request), object(Closure)) in Http.php 第 187 行

http.php 第 139 行中的 Http->runWithRequest(object(Request))

index.php 第 20 行中的 Http->run()

环境变量

GET Data

/index/index    

POST Dataempty

Filesempty

Cookies

PHPSESSID    a334386e8fff32d2936329a874461407

pgv_pvi    4820957184    

pgv_si    s5068664832    

thinkphp_show_page_trace    0|0    

Sessionempty

服务器/请求数据

PATH C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C: \WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) 管理引擎组件\DAL;C:\Program Files\Intel\Intel(R) 管理引擎组件\DAL ;C:\Program Files (x86)\Intel\Intel(R) 管理引擎组件\IPT;C:\Program Files\Intel\Intel(R) 管理引擎组件\IPT;C:\Program Files\Intel\WiFi\ bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\WINDOWS\System32\OpenSSH\;C:\Users\gznet\AppData\Local\Microsoft\WindowsApps   ​​ 

SYSTEMROOT    C: \WINDOWS    

COMSPEC    C:\WINDOWS\system32\cmd.exe    

PATHEXT    .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE; .WSF;.WSH;.MSC    

WINDIR    C:\WINDOWS    

PHP_FCGI_MAX_REQUESTS    1000    

PHPRC    D:/myphp_www/PHPTutorial/php/php-7.2.1-nts /    

_FCGI_SHUTDOWN_EVENT_    2240    

SCRIPT_NAME    /index.php    

REQUEST_URI    /index/index    

QUERY_STRING    /index/index    

REQUEST_METHOD    GET

SERVER_PROTOCOL    HTTP/1.1    

GATEWAY_INTERFACE    CGI/1.1    

REDIRECT_QUERY_STRING    /index/index    

REDIRECT_URL    /index/index    

REMOTE_PORT    50480

SCRIPT_FILENAME    D:/myphp_www/PHPTutorial/WWW/tp6/public/index.php    

SERVER_ADMIN    admin@php.cn    

CONTEXT_DOCUMENT_ROOT    D:/myphp_www/PHPTutorial/WWW /tp6/public    

CONTEXT_PREFIX    

REQUEST_SCHEME    http    

DOCUMENT_ROOT    D:/myphp_www/PHPTutorial/WWW/tp6/public    

REMOTE_ADDR    127.0.0.1    

SERVER_PORT    80    

SERVER_ADDR    127.0.0.1    

SERVER_NAME    tp6.io    

SERVER_SOFTWARE    Apache/2.4.23 (Win32) OpenSSL/1.0.2j mod_fcgid/2.3.9    

SERVER_SIGNATURE    

SystemRoot    C:\WINDOWS

HTTP_COOKIE PHPSESSID=a334386e8fff32d2936329a874461407; pgv_pvi=4820957184; pgv_si=s5068664832; thinkphp_show_page_trace=0|0    

HTTP_ACCEPT_LANGUAGE    zh-CN,zh;q=0.9    

HTTP_ACCEPT_ENCODING    gzip, deflate    

HTTP_ACCEPT    text/html,application/xhtml+xml,application/ xml;q=0.9,image/webp,image/apng,*/*;q=0.8    

HTTP_USER_AGENT    Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, 如 Gecko) Chrome /72.0.3626.121 Safari/537.36    

HTTP_UPGRADE_INSECURE_REQUESTS    1    

HTTP_CACHE_CONTROL    max-age=0    

HTTP_CONNECTION    close    

HTTP_HOST    tp6.io  

# #REDIRECT_STATUS    200    

FCGI_ROLE    RESPONDER    

PHP_SELF    /index.php    

REQUEST_TIME_FLOAT    1558856696.332    

REQUEST_TIME    1558856696    

环境变量空

ThinkPHP Constantsempty

ThinkPHP V6.0.0RC1 { 十年磨一剑-为API开发设计的性能框架}

致命错误:未捕获错误:调用成员D:\myphp_www\PHPTutorial\WWW\tp6\vendor\topthink\framework\src\think\Response.php:156 中的 null 函数 save() 堆栈跟踪:#0 D:\myphp_www\PHPTutorial\WWW\tp6\vendor \topthink\framework\src\think\initializer\Error.php(55): think\Response->send() #1 [内部函数]: think\initializer\Error->appException(Object(Error)) # 2 {main} 在 D:\myphp_www\PHPTutorial\WWW\tp6\vendor\topthink\framework\src\think\Response.php 中抛出,位于第 156 行

致命错误:未捕获错误:调用成员函数 save () 在 D:\myphp_www\PHPTutorial\WWW\tp6\vendor\topthink\framework\src\think\Response.php:156 中为 null 堆栈跟踪:#0 D:\myphp_www\PHPTutorial\WWW\tp6\vendor\topthink \framework\src\think\initializer\Error.php(55): think\Response->send() #1 D:\myphp_www\PHPTutorial\WWW\tp6\vendor\topthink\framework\src\think\initializer\ Error.php(88): think\initializer\Error->appException(Object(think\exception\ErrorException)) #2 [内部函数]: think\initializer\Error->appShutdown() #3 {main} 抛出在 D:\myphp_www\PHPTutorial\WWW\tp6\vendor\topthink\framework\src\think\Response.php 线上 156


雨

全部回复(2)
lk

dump(Db::query('SELECT * FROM `user`'));这样就可以了,教程上的版本太老了

YaoNanM

有字符写错,认真检查下代码

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责声明 Sitemap
PHP中文网:公益在线PHP培训,帮助PHP学习者快速成长!