社区
基础编程
帖子详情
php5出现:using $this when not in object
stan23
2005-06-29 08:51:02
一般是什么情况引起的?
...全文
70
1
打赏
收藏
php5出现:using $this when not in object
一般是什么情况引起的?
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
1 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
ice_berg16
2005-06-29
打赏
举报
回复
已经告诉你了
using $this when not in object
$this关键字只能使用在类中,你在类外使用了$this,所以出错了。
织梦错误mynews.lib.
php
on line 40,织梦错误Fatal error:
Using
$this when not in
object
context...
今天在用织梦模板做的网站后台生成栏目页时
出现
如下错误:Fatal error:
Using
$this when not in
object
context inD:\www\meinvtup\include\taglib\mynews.lib.
php
on line40或者是在织梦模板中的首页调用站内新闻后提示如下错误:Fatal error:
Using
$this when not in...
dedecms织梦提示Fatal error:
Using
$this when not in
object
context
打开/include/taglib/mynews.lib.
php
文件。
Using
$this when not in
object
context错误原因及解决办法
在
php
中
出现
Using
$this when not in
object
context的原因是在静态方法中使用$this或者直接调用非静态的方法。 错误代码1: //think
php
模型类 class StudentCharge extends Model { public static function getCharges($id) { $charg...
Using
$this when not in
object
context 静态方法调用非静态属性和方法 出错 解决
Using
$this when not in
object
context----
出现
这个报错是因为: 静态方法内不能使用 $this, 静态属性和方法被创建时,可能还没有任何这个类的实例可以被调用,静态属性不需要实例化就可以直接使用,在类还没有创建时就可以直接使用; 原因:由于静态方法在内存中只有一份,无论你调用多少次,都是共用的,而且没有对象的概念,所以不能在静态方法里面使用$thi...
报错
Using
$this when not in
object
context错误原因及解决办法
在
php
中
出现
Using
thiswhennotin
object
context的原因是在静态方法中使用this when not in
object
context的原因是在静态方法中使用thiswhennotin
object
context的原因是在静态方法中使用this或者直接调用非静态的方法。 错误代码1 //think
php
模型类 class StudentCharge extends M...
基础编程
21,891
社区成员
140,342
社区内容
发帖
与我相关
我的任务
基础编程
从PHP安装配置,PHP入门,PHP基础到PHP应用
复制链接
扫一扫
分享
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章