我的网站出错。 [英] Error in my website.

查看:112
本文介绍了我的网站出错。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我启用错误显示时,我的网站显示错误当前无法处理此请求HTTP ERROR 500 主要错误是。

解析错误:语法错误,意外' )',期待::(T_PAAMAYIM_NEKUDOTAYIM) /home/afghauri/public_html/config.php的code-keyword>  211  





这是我的代码中的第211行。

 如果(empty(BASE_PATH)||  $ base  == '  BASE_PATH'){



BASE_PATH是第48行定义的Magic Constant为

 define('  BASE_PATH',_ _ DIR __); 



这里是我的代码的第210行和第212行。

$

$ base = BASE_PATH;





  $ base  = __DIR __; 



更新

最奇怪的是它在localhost中完美运行但是当我将它上传到我的cpanel时它开始这样做



什么我试过了:



i尝试将

 if(空(BASE_PATH)

改为< pre lang =PHP> if(BASE_PATH === NULL

虽然有效,但它搞砸了我的网站界面。

解决方案

base == ' BASE_PATH'){



BASE_PATH是第48行定义的Magic Constant为

 define('  BASE_PATH',_ _ DIR __); 



这里是我的代码的第210和212行。

210

< pre lang =PHP>


base = BASE_PATH;



212

  


base = __DIR __;



更新

最奇怪的是它在localhost中工作得很好但是当我将它上传到我的cpanel时它会开始这样做



我尝试了什么:



i尝试更改

如果(空(BASE_PATH)

进入

如果(BASE_PATH === NULL 

有效但它搞砸了我的网站界面


My website was showing error currently unable to handle this request HTTP ERROR 500 when i enabled the error display the main error is.

Parse error: syntax error, unexpected ')', expecting :: (T_PAAMAYIM_NEKUDOTAYIM) in /home/afghauri/public_html/config.php on line 211



here is what line 211 looks in my code.

if ( empty(BASE_PATH) || $base == 'BASE_PATH' ) {


BASE_PATH is a Magic Constant defined on line 48 as

define('BASE_PATH', __DIR__);


here is line 210 and 212 of my code.
210

$base = BASE_PATH;


212

$base = __DIR__;


Update
the strangest thing is that it's working perfectly in localhost but when i upload it to my cpanel it starts doing that

What I have tried:

i tried changing the

if(empty(BASE_PATH)

into

if(BASE_PATH === NULL

that worked but it messed up my websites interface.

解决方案

base == 'BASE_PATH' ) {


BASE_PATH is a Magic Constant defined on line 48 as

define('BASE_PATH', __DIR__);


here is line 210 and 212 of my code.
210


base = BASE_PATH;


212


base = __DIR__;


Update
the strangest thing is that it's working perfectly in localhost but when i upload it to my cpanel it starts doing that

What I have tried:

i tried changing the

if(empty(BASE_PATH)

into

if(BASE_PATH === NULL

that worked but it messed up my websites interface.


这篇关于我的网站出错。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆