Rumah  >  Soal Jawab  >  teks badan

Helo, apakah yang berlaku apabila ia menggesa ralat sintaks, ':' yang tidak dijangka, menjangkakan ',' atau ')'?

[0] ParseError dalam Index.php baris 10

ralat sintaks, tidak dijangka ':', expecting ',' atau ')'

<?phpnamespace appindexcontroller;gunakan thinkfacadeDb;class Index{     public function index  {  mp (Db::query(sql:'SELECT * FROM 'user' LIMI 1'));    }    hello fungsi awam($name = 'ThinkPHP6')    {        kembali 'hello,' . $nama;    }}

Call Stack

dalam Index.php baris 10

at ComposerAutoloadincludeFile('D:myphp_wwwPHPTuto...') dalam ClassLoader.php baris 322

...Loads'loaderClasderClass )

at spl_autoload_call('appindexcontroller...')

at class_exists('appindexcontroller...') dalam Controller.php baris 103

at Controller->controller('index') dalam Controller.php baris 57

di Controller->exec() dalam Dispatch.php baris 118

at Dispatch->run() dalam Route.php baris 748

di Route->think{closure}(objek(Request) (Penutupan), null)

at call_user_func_array(objek(Penutupan), [objek(Permintaan), objek(Penutupan), null]) dalam Middleware.php baris 206

di Middleware->think{closure}(objek( Permintaan)) dalam TraceDebug.php baris 48

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

at call_user_func_array([object(TraceDebug), 'handle'], [object(Request ), object(Closure), null]) dalam Middleware.php baris 206

at Middleware->think{closure}(object(Request)) dalam SessionInit.php baris 58

at SessionInit->handle(object(objek Permintaan), objek(Penutupan), null)

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

at Middleware ->fikirkan{penutupan}(objek(Permintaan)) dalam LoadLangPack.php baris 60

di LoadLangPack->handle(objek(Permintaan), objek(Penutupan), null)

at call_user_func_array([objek_func_array([objek(Permintaan)) , 'handle'], [object(Request), object(Closure), null]) dalam Middleware.php baris 206

at Middleware->think{closure}(object(Request)) dalam CheckRequestCache.php baris 53

di CheckRequestCache->handle(objek(Permintaan), objek(Penutupan), null)

at call_user_func_array([objek(CheckRequestCache), 'mengendalikan'], [objek(Permintaan), objek(Penutupan), null]) dalam Middleware.php baris 206

di Middleware->think{closure}(object(Request))

at call_user_func(object(Closure), object(Request)) dalam Middleware.php baris 150

di Middleware->dispatch(object(Request)) dalam Route.php baris 755

at Route->dispatch(object(Request), object(Closure)) dalam Http.php baris 187

at&g Http ;runWithRequest(object(Request)) dalam Http.php baris 139

at Http->run() dalam index.php baris 20

Environment Variables

GET Data

  index.php

index  Filesempty

Cookies

PHPSESSID    a334386e8fff32d2936329a874461407    

pgv_pvi    4820957184    4820957184       6 832    

thinkphp_show_page_trace    0|0    

Sessionempty

Data Pelayan/Permintaan

PATH    C:Program Files (x86)InteliCLS Files Clients;Clien InteliCLS Files C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem;C:WINDOWSSystem32WindowsPowerShellv1.0;C:Program Files (x86)IntelIntel(R) Management Engine ComponentsDAL;C:Program FilesIntelIntel(R) Management Engine ComponentsDAL;C:Program Management Engine ComponentsDAL (x86Program Files); )Komponen Enjin Pengurusan IntelIntel(R)IPT;C:Program FilesKomponen Enjin Pengurusan IntelIntel(R)IPT;C:Program FilesIntelWiFibin;C:Program FilesCommon FilesIntelWirelessCommon;C:WINDOWSSystem32OpenSSH;C:UsersgznetAppDataLocal

WS    

COMSPEC    C:WINDOWSsystem32cmd .exe    

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

WINDIR    C:WINDOWS    _0 0 FC 

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

_FCGI_SHUTDOWN_EVENT_    2240    

SCRIPT_NAME    /index.php     

_FCGI_SHUTDOWN_EVENT_    2240    

SCRIPT_NAME    /index.php     

_index

 QUE /

 QUE URI 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     

   

REM O

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    

OT_MINTA_SKIM     http php_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 🜎 Signature_Ross   

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, kempiskan    

 teks .xml/html/html ;q=0.9,imej/webp,imej/ apng,*/*;q=0.8    

HTTP_USER_AGENT    Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, seperti Gecko) Chrome/72.0.3626.3626.12 _PERMINTAAN_INSECURE    1    

KAWALAN_CACHE_HTTP    maks- umur=0    

HTTP_CONNECTION    close    

HTTP_HOST    tp6.io    

REDIRECT_STATUS    200    

 PH  

RESPONDER /index.php    

REQUEST_TIME_FLOAT    1558856696.332    

REQUEST_TIME    1558856696    

Persekitaran Pembolehubah

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

Ralat maut: Ralat Tidak Ditangkap: Panggil ke fungsi ahli save() pada null dalam D:myphpthirctopwork6pts. Jejak tindanan: #0 D :myphp_wwwPHPTutorialWWWtp6vendortopthinkframeworksrcthinkinitializerError.php(55): thinkResponse->send() #1 [internal function]: thinkinitializerError->appException(Objek(Ralat)) #2 {main} dilemparkan ke dalam D:myphpwphpthinkframework 156

Maut ralat: Ralat Tidak Ditangkap: Panggil ke fungsi ahli save() pada null dalam D:myphp_wwwPHPTutorialWWWtp6vendortopthinkframeworksrcthinkResponse.php:156 Surih tindanan: #0 D:myphp_wwwPHPTutorialWWWtp6vendortopthinkframeworksrcthinkinitializerError(.php1) torialWWWtp6vendortopthinkframeworksrcthinkinitializerError. php(88): thinkinitializerError->appException(Objek(thinkexceptionErrorException)) #2 [fungsi dalaman]: thinkinitializerError->appShutdown() #3 {main} dilemparkan ke dalam D:myphp_wwwPHPTutorialWWWtp6vendortopthinkframeworksphp

Responsline.php

雨1996 hari yang lalu5543

membalas semua(2)saya akan balas

  • lk

    lk2019-11-30 13:42:32

    dump(Db::query('SELECT * FROM `user`')); Itu sahaja versi dalam tutorial

    balas
    0
  • YaoNanM

    YaoNanM2019-05-27 11:05:37

    Sesetengah aksara ditulis dengan salah, sila semak kod dengan teliti

    balas
    0
  • Batalbalas