草庐IT

does_not_have_foo

全部标签

php - 未捕获的 ReflectionException : Class log does not exist in/vendor/laravel/framework/src/Illuminate/Container/Container. php:738

我的Laravel5.2运行良好,我很高兴。然后我执行了:phpartisanconfig:cache我的日子变得更加黑暗我收到这条消息:PHPFatalerror:UncaughtReflectionException:Classlogdoesnotexistin/home/vagrant/Code/vendor/laravel/framework/src/Illuminate/Container/Container.php:738Stacktrace:#0/home/vagrant/Code/vendor/laravel/framework/src/Illuminate/Conta

php - Laravel 5.2 测试 : Test is not running

我已经通过终端使用命令创建了一个测试:phpartisanmake:testUserTest现在我想使用以下命令运行测试:供应商/bin/UserTest但它返回bash:vendor/bin/UserTest:没有那个文件或目录PHPunit已安装。我检查过了。我错过了什么吗? 最佳答案 从Laravel根项目目录使用此命令运行测试:vendor/bin/phpunit如果你想运行自定义包测试,使用:vendor/bin/phpunitpackages/name/package/ 关于

php - 火力基地: "Could not parse auth token."

你好,我正在使用带有php的firebase并使用这个library.我收到此错误“无法解析身份验证token。”我的授权token是正确的,因为我也使用了与node.js相同的token。我的代码是这样的require"vendor/autoload.php";constDEFAULT_URL='https://xxxxxxxxx.firebaseio.com';constDEFAULT_TOKEN='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';$firebase=new\Firebase\FirebaseLib(DEFAULT_URL,DEFAULT_TOK

PHP-FPM 错误日志显示 "Not a JPEG file: starts with 0x47 0x49"

在我的PHP-FPM日志文件中,我有很多行如下所示[18-Sep-201603:59:06]WARNING:[poolwww]child5425saidintostderr:"NotaJPEGfile:startswith0x470x49"这是什么意思? 最佳答案 这是一个commonerror.看起来你正在用imagecreatefromjpeg打开一个文件,但它不是jpeg,它是一个gif文件,看看thisnote关于起始字节。 关于PHP-FPM错误日志显示"NotaJPEGfil

php - 十月 CMS : Not able to create a Form Widget

我是OctoberCMS的新手,正在学习创建表单小部件。但我收到以下错误:Thepartial'_field_actorbox.htm'isnotfound./opt/lampp/htdocs/octobermovies/modules/system/traits/ViewMaker.phpline65我的小部件文件夹名称是“formwidgets”我在partials文件夹中的partials文件名为“_widget.htm”我的formwidgets的内容>Actorbox.phpnamespaceWatchlearn\Movies\FormWidgets;useBackend\C

php - 404 page not found 您请求的页面在 codeigniter 中找不到

我们的代码如下应用程序/配置/config.php$config['base_url']='http://myworldmirror.com/';$config['index_page']='index.php/home';.htaccessRewriteEngineOnRewriteBase/RewriteCond%{REQUEST_FILENAME}!-fRewriteCond%{REQUEST_FILENAME}!-dRewriteRule^(.*)$index.php/$1[L]Options-Indexes应用程序/配置/database.php$active_group='

PHP - 使用命名空间\{Foo, Bar}?

PHP什么时候有下面这个的?useNamespace\{Foo,Bar}我从thephppleague中发现了这个模式:namespaceAcme;classFoo{/***@typeAcme\Bar*/public$bar;/***Construct.**@param\Acme\Bar$bar*/publicfunction__construct(Bar$bar){$this->bar=$bar;}}classBar{//...}然后:有效吗?如果是,在哪里可以进一步研究? 最佳答案 是的,这是有效的。它是在PHP7.0中引入的。

php - 替换 () 之间的所有 "foo"

我的正则表达式代码有问题,问题是:我想替换所有“foo”值,但只替换“()”内的值。示例:tryfoofoo-foo(tryfooinside,foofoofoofoo)我想用“boo”替换括号中的所有“foo”字符串。 最佳答案 假设括号“有效”,您可以替换所有foo后跟),中间没有(:$str=preg_replace('/foo(?=[^()]*\))/','bar',$str);工作示例:http://ideone.com/xezU7另一种选择,也假设没有嵌套对,是匹配"(...)"标记并使用回调,但它可能使用过度的力:回调

php - fatal error : Class 'ZMQContext' not found ( but it is installed and works on the terminal )

我想试试ZeroMQ,我写了两个php文件,service.php和client.php。我使用linux终端运行服务php/web/test/service.php,没问题,终端打印“正在等待客户端连接...”。但是,我通过chrome资源管理器请求我的client.php,发生了错误,我检查了我的error.log,有消息“phpfatalerror:class'ZMQContext'notfound.......”我使用命令php-m来检查我的php扩展,zmq已经在该列表中。 最佳答案 问题是ZMQ模块已加载到PHPCLI(

php - Laravel Eloquent Not Created_At 今天

好吧,所以我正在尝试进行查询,其中不是created_at的用户这一天被选中,我遇到了一点麻烦。我尝试过的所有内容仍然被选中。这是我尝试过的一些东西(没有成功):$users=User::where('created_at','!=',date('Y-m-dH:i:s'))->get()$users=User::where('created_at','!=',newDateTime())->get()$users=User::where('created_at','!=',date('Y-m-d'))->get()$users=User::where('created_at','!='