我加了
"require": {
"ext-opcache": "*",
到eDirectory Symfony 2.8应用的composer.json
,但它给了我一个错误:
$ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested PHP extension ext-opcache * is missing from your system. Install or enable PHP's opcache extension.
但是,我确实安装了OPcache!
$ php -r "phpinfo();" | grep OPcache -a3
Zend OPcache
Opcode Caching => Up and Running
Optimization => Enabled
它不会抱怨"ext-gd": "*"
或"ext-mbstring": "*"
。
PHP 5.6.27
参考方案
扩展名是Zend OPcache
而不是OPcache
。您需要提供全名:
"ext-zend-opcache": "*"
PHP:获取调用引用的数组名称 - php假定以下函数并调用:function doSomething( &$someArray ) { // Do something to $someArray } $names=array("John", "Paul", "George", "Ringo"); doSomet…
PHP-将日期插入日期时间字段 - php我已在数据库中使用datetime字段存储日期,使用PHP将“今天的日期”插入该字段的正确方法是什么?干杯, 参考方案 我认为您可以使用php date()函数
PHP-如何获取类的成员函数列表? - php如果我知道班级的名字。有没有办法知道类的成员函数列表? 参考方案 get_class_methods()是你的朋友
PHP-MySQL结果转换为JSON - php我试图了解如何将MySQL结果转换为JSON格式,以便以后可以在Javascript中使用此JSON来构建HTML表。但是我的代码只是产生大量的空值,我还不明白为什么。$result = mysqli_query($con, "SELECT * FROM Customers"); $test = json_encode($result);…
PHP Count数组元素 - php嗨,有人可以解释为什么这会返回“数组由0个元素组成”。 :$arr = array(1,3,5); $count = count($arr); if ($count = 0) { echo "An array is empty."; } else { echo "An array has $count elements.…