Moved the site to another server. Add file statistic.php to the ?ron to perform. Only this Cron that does not like something. Write errors:
/home/site/www/statistic.php: line 1: ?php: No such file or directory
/home/site/www/statistic.php: line 2: syntax error near unexpected token `"bd.php"'
/home/site/www/statistic.php: line 2: `include ("bd.php");
Run Code Online (Sandbox Code Playgroud)
There is my code
<?php
include ("bd.php");
$result = mysql_query("SELECT MAX(id) FROM statistic_dep",$db);
$myrow1 = mysql_fetch_array($result);
$last_id=$myrow1[0];
...
Run Code Online (Sandbox Code Playgroud) 我目前正在hrtime()
我的一个项目中使用聊天系统(仍处于开发阶段)。
在发送的每条消息中,我将hrtime(true)
值与消息一起存储到数据库中。
因此,收件人将根据应用程序 localStorage 中存储的最后一条消息的时间请求新消息。例如: select*from messages_table where message_hrtime>$last_hrtime and message_to=$me
直到今天它一直工作正常,我注意到插入数据库的新消息
hrtime(true)
值减少了,这使得新消息无法被接收。
请注意,列 message_hrtime 在 id 35 上减少
根据这篇文章 https://thephp.cc/articles/high-resolution-monotonic-timer, hrtime() 不断增加。
现在很困惑是否hrtime(true)
一致。
PHP 7.3
有没有办法使用该lodash
函数返回与模式匹配的属性数组?
_.magicMethod({a:'hi', b:13, c:undefined, d:null, e:null}, null)
return => `['d','e']`
Run Code Online (Sandbox Code Playgroud)
我检查了文档,但什么也没找到:/谢谢。
我在 javascript 中使用 padStart 但它不适用于 Internet Explorer 我想知道是否有人知道替代它的替代方法。谢谢
在远程服务器上没有问题,但在localhost(xampp 3.1.)中,我无法关闭报告通知.
<?php
$Fname = $_POST["Fname"];
...
Run Code Online (Sandbox Code Playgroud)
结果:
Notice: Undefined index: Fname in D:\xampp\htdocs\xx\php01\form01.php on line 6
Run Code Online (Sandbox Code Playgroud)
php.ini中
; Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
; Development Value: E_ALL
; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT
; http://php.net/error-reporting
error_reporting = E_ALL & ~E_NOTICE //shouldn't this line turn off notice reporting ?
Run Code Online (Sandbox Code Playgroud)
有什么建议吗?
我的yii应用程序中的登录过程有问题.我有两种不同类型的用户,包括管理网站和客户的管理员用户.我正在使用CwebUser
并UserIdentitiy
管理这两个组的登录.但我的问题是,当客户登录网站时,他也可以访问管理页面.我想要做的是说应用程序为它们创建两个不同的身份会话.我不想使用访问控制规则之类的东西.有没有办法在Yii风格中为它们创建不同的会话?
php ×4
javascript ×2
arrays ×1
cron ×1
identity ×1
lodash ×1
login ×1
properties ×1
syntax-error ×1
xampp ×1
yii ×1