php分页类问题在线等~

[复制链接]
查看11 | 回复1 | 2011-4-6 03:42:59 | 显示全部楼层 |阅读模式
php 分页类里面 兄弟连高老师讲的视频教程。
class page{
private $uri;
}
private function __get($args){
if($args==\"limit\")

return $this-limit;
else

return null;
}
调用的是$sql=\"select * from shops {$page-limit}\";
提示 Warning: The magic method __get() must have public visibility and cannot be static in D:\\wamp\\www\\li
我只粘贴了部分代码了..
这个怎么解决呢... 会不会是wamp配置问题呢? 类跟配置有关系吗??源码是老师的没动过...
高手帮我解决下啊~~
回复

使用道具 举报

千问 | 2011-4-6 03:42:59 | 显示全部楼层
<pre id=\"best-answer-content\" class=\"reply-text mb10\">你要理解__get()这个PHP类的内置魔术方法才行啊!
private function __get($args) 换成 public function __get($args) 试试!!!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行