我刚刚升级到PHP 7并且发现它很好而且很快,但是自从我升级(完全不变的代码)以来,我一直在得到间歇性的内部服务器错误(500).我正在记录错误,普通日志中没有任何内容,但在事件查看器中,我有成千上万的这些:
The description for Event ID 487 from source Zend OPcache cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
If the event originated on another computer, the display information had to be saved with the event.
The following information was included with the event:
Base address marks unusable memory region. Please setup opcache.file_cache and …
Run Code Online (Sandbox Code Playgroud) Float上的truncate方法显然将float截断为整数.那么这里发生了什么:
>> 14820.truncate
=> 14820
>> (148.2 * 100)
=> 14820.0
>> 14820.0.truncate
=> 14820
>> (148.2 * 100).truncate
=> 14819
Run Code Online (Sandbox Code Playgroud)
为什么最后的计算输出不是14820?
我正在建立一个网站,人们(即史密斯先生)填写问卷(未显示)并使用史密斯先生的"邮政编码"并找到(3)人/代表(即...... Bob,Chuck和Sally)那些已经是'众议员'并且在之前的场合,选择将史密斯先生的邮政编码通过电子邮件发送给他们(Bob,Chuck和Sally)以回复所有问卷.
所以下面我从上一页的问卷表格中提取了史密斯先生的邮政编码"LifeZip"和电子邮件地址"LifeEmail",并使用史密斯先生的邮政编码"LifeZip"找到(3)人/代表(碰巧是Bob,Chuck和Sally)已经存储在单独的表格"repstable"中,与史密斯先生的邮政编码相匹配,这样他们就可以回应史密斯先生的问卷.
我在将多封电子邮件(即Bob,Chuck和Sally)放入"to:"字段时遇到问题.
无论脚本是单独向不同的人发送相同的电子邮件,还是在"收件人:"字段中列出了所有电子邮件,我都会选择其中一个.提前致谢!
<?
session_start();
session_register('LifeZip'); // Zip Code of Mr. Smith from questionaire on previous page
session_register('LifeEmail'); // Email of Mr. Smith from questionaire on previous page
// connect to db
$conn = db_connect();
if (!$conn)
return 'Could not connect to database server - please try later.';
// convert Mr. Smith's LifeZip and LifeEmail from previous page into variable
echo 'use the variables below to find customer the just filled out forms from previous pages (initial info …
Run Code Online (Sandbox Code Playgroud) 在ZF2中,如何从另一个模块添加路由作为路由的子节点?我假设有办法在某个地方挂钩活动?
例如,模块A定义了一条路线/foo
.在模块B中,我想/foo/bar
通过创建/bar
路径作为'foo'的子路径来添加路由.