草庐IT

objc_class

全部标签

php - Symfony 2 功能测试 : authenticate user of own User class

如HowtouseanauthenticateduserinaSymfony2functionaltest?的回答中所述Symfony\Component\Security\Core\User\User有一个简单的解决方案。但是我有不同的用户类(一些必要的附加字段),我想用它来验证用户。我如何为它设置供应商? 最佳答案 这里讨论的是一个棘手的问题:https://github.com/symfony/symfony/issues/5228虽然它是2.1,但我使用2.2时仍然会发生这种情况。下面是我如何进行测试认证://Createa

php - 使用 codeigniter PHP fatal error : Class 'MY_Model' not found

现在我正在学习CodeIgniter_2.1.4,但是我遇到了一个php错误;我在/data/www/application/core中有一个my_model.php文件db->insert($this::DB_TABLE,$this);$this->{$this::DB_TABLE_PK}=$this->db->insert_id();}privatefunctionupdate(){$this->db->update($this::DB_TABLE,$this,$this::DB_TABLE_PK);}publicfunctionpopulate($row){foreach($ro

php - fatal error : Uncaught exception 'Exception' in PHPExcel classes

谁能告诉我,为什么从PHPExcel类中抛出以下错误Fatalerror:Uncaughtexception'Exception'withmessage'Couldnotclosezipfile/var/www/mydomain/myexcel.xlsx.'in/var/www/mydomain/Classes/PHPExcel/Writer/Excel2007.php:400Stacktrace:#0/var/www/mydomain/myexcel.php(173):PHPExcel_Writer_Excel2007->save('/var/www/mydomain...')#1{

php - ' fatal error : Class 'CURLFile' not found' error in Facebook PHP Application for 'upload photo to user' s timeline'

我刚刚尝试使用FacebookPHPSDK开发一个Facebook应用程序。Facebook开发者网站中给出的示例代码如下。'YOUR_APP_ID','secret'=>'YOUR_APP_SECRET','fileUpload'=>true,'allowSignedRequest'=>false//optionalbutshouldbesettofalsefornon-canvasapps);$facebook=newFacebook($config);$user_id=$facebook->getUser();$photo='./mypic.png';//Pathtothepho

php - symfony2 ContextErrorException : Catchable Fatal Error: Object of class Proxies\__CG__\. ..\Entity\... 无法转换为字符串

我遇到了一些奇怪的事情:我通过app/consoledoctrine:generate:entity创建了三个doctrine实体:类别用户发布我建立了关系,并且一切都与fixtures数据一起正常工作(app/consoledoctrine:fixtures:load)。一篇文章属于一个类别(category_id),并且有一个作者(user_id)。我使用app/consoledoctrine:generate:crud为我的所有实体获取CRUD操作。当我更新一个帖子时,我得到了这个奇怪的错误:ContextErrorException:CatchableFatalError:Ob

php - 在 Laravel 5.1 中使用中间件时出现 Class jwt-auth does not exist 错误

我按照官方的JWT-Auth安装https://github.com/tymondesigns/jwt-auth/wiki/Installation.现在我的Controller中有一个中间件:$this->middleware('jwt-auth',['only'=>['postChange','postChoose']]);我还在config/app.php的提供程序数组中添加了Tymon\JWTAuth\Providers\JWTAuthServiceProvider::class但是,当我向API发出请求时,我收到此错误消息:ReflectionExceptioninConta

php - Laravel PHP fatal error : Class 'Table' not found with migrate command

我正在使用Laravel,我正在尝试将一些表迁移到我的数据库(phpmyadmin)。之前给我带来了一些麻烦,所以我在数据库中删除了迁移表中的所有行,所以现在什么都没有了。所以我尝试运行“phpartisanmigrate”,但出现以下错误:PHPFatalerror:Class'Table'notfoundin/var/www/loja/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.phponline301{"error":{"type":"Symfony\Component\Debug\Ex

PHP fatal error : Class 'InvalidArgumentException' not found in <file> on line X?

我在我的php.log中看到这一行:PHPFatalerror:Class'MyNamespace\InvalidArgumentException'notfoundinonlineXX行包含以下内容:thrownewInvalidArgumentException("Error");它发生在页面重新加载时。首先,我将一些值放入表单中,单击提交并加载我的页面。我单击刷新页面(使用我的浏览器功能)重新加载页面,这就是我收到错误的地方。也许当我刷新页面时,执行了不同的代码路径。但我仍然认为这是一个nativePHP类,应该始终有效,但在我的情况下它会抛出错误。我在Windows上使用PHP

php - fatal error : Class not found in AppKernel. PHP

我已经按照Symfony文档生成了一个新的Bundle(ImgBundle),但是当在浏览器中重新加载应用程序时,它无法识别bundle的主类。这是我的ImgBundle.php:应用内核.php:getEnvironment(),['dev','test'],true)){$bundles[]=newSymfony\Bundle\DebugBundle\DebugBundle();$bundles[]=newSymfony\Bundle\WebProfilerBundle\WebProfilerBundle();$bundles[]=newSensio\Bundle\Distribu

php - fatal error : Class 'SELF' not found

我有以下相关代码:try{self::$db=newPDO($dsn,self::USER,SELF::PASS);//Connecttothedatabase,andstorethepdoobject.self::$db->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);}catch(PDOException$e){thrownewException("Therehavebeenanerrorintheconnection:".$e->getMessage());}执行此代码所在的静态函数时,出现以下错误:Fatalerr