-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
关于Bag #119
Comments
应该是说网页授权 $user = $_SESSION['logged_user'] ; |
Bag的用法与普通类用法一样。上面已经给了你例子了 |
我用$Bag->all()的时候,老是报类似什么serialize __autoload_的错误。 |
@iam993 请贴错误截图 |
:( --------------------------------------------------------上面是错误,下面是代码 class UserController extends Controller {
} |
SESSION 不支持对象存储吧?支持数组与标量。所以你直接把 $auth->authorize() 存进去就是错的吧? $user = ($_SESSION['user']); // 你这里得到的要么是数组要么是标量
var_dump(($user->all())); // 然而你却把它当成Bag对象用,谁教你的呢?
|
https://github.com/overtrue/wechat/wiki/%E7%BD%91%E9%A1%B5%E6%8E%88%E6%9D%83 // 请一定要自己存储用户的登录信息,不要每次都授权 var_dump($_SESSION['logged_user']); 我是看了你的例子,我以为可以这样用。那要怎么用呢?就我这里例子。 |
@iam993 请学习PHP基础 |
懂了,大脑生锈,我把session想成c#的了,才学这个语言,还有点不熟。 |
@iam993 没想过,上班太忙 |
用户验证过后,返回的是一个Bag对象,请问怎么使用这个对象。
另外,在getUser里return new Bag($this->http->get($url));
为什么不直接写为return $this->http->get($url);呢?
The text was updated successfully, but these errors were encountered: