如何创建不可阻挡的while循环,如果它已经运行不再运行它,我假设如果运行它的脚本将更新数据库中的最后cron时间,脚本将检查当前时间 - 40秒是否小于上一个cron时间.我所拥有的样本,但那是过度循环(一次又一次地运行)谢谢!
<?php
ignore_user_abort(1); // run script in background
set_time_limit(0); // set limit to 0
function processing()
{
//some function here
setting::write('cron_last_time', $time); // write cron last time to database
}
$time = current_timestamp(); // current time
$time_before = $time - 20; //
$settings = setting::read('module_cron_email'); // Get last cron time from database ( in array )
$time_last = $settings['setting_value']; // Last cron time get value from array
if ($time_before < $time_last) // check if time before is less …Run Code Online (Sandbox Code Playgroud) 我用kime8r charset和mimeDecode有问题,
举个例子:
主题:=?KOI8-R?B?8NLJ18XUIQ ==?=来自:=?KOI8-R?B?4czFy9PBzsTSIPfPzMvP1w ==?=
变为:
主题:п÷я─п╦п╡п╣я┌!来自:АлександрВолков
它应该如下,
主题:Привет!来自:АлександрВолков
所以确切的问题是
if (is_string($this->_decode_headers)) {
$conv = @iconv($charset, $this->_decode_headers, $text);
$text = ($conv === false) ? $text : $conv;
}
Run Code Online (Sandbox Code Playgroud)
谢谢.
更新已 解决,问题是电子邮件标题已保存到其他字符集中的数据库.
我有查询
http://mysite.com/?index.php?var=somevalue&activate=others
Run Code Online (Sandbox Code Playgroud)
并且需要像这样传递一个变量
$myvar = "var=somevalue&activate=others";
Run Code Online (Sandbox Code Playgroud)
但没有htaccess!
可以任何身体解释我应该修改什么,隐藏图像后如何保持div为空白,没有内容,但宽度和高度与图像相同,
确切的例子:http://jsfiddle.net/rJuWL/1/
所以隐藏后,第二个!来到First!,但我需要保持第一!空白第二!
HTML
<html>
<body>
<div>First!</div>
<div class="loading">
<img id="loading" src="http://preloaders.net/preloaders/284/preview.gif" class="none"/>
<div>Second!</div>
</div>
</body>
Run Code Online (Sandbox Code Playgroud)
CSS
.none{display:none}
.loading{width: 32px;height:32px;}
Run Code Online (Sandbox Code Playgroud)
使用Javascript
showLoading();
function showLoading() {
$("#loading").hide();
$("#loading").show().delay(2500).fadeOut('10');
}
Run Code Online (Sandbox Code Playgroud) 我在用PHP填写数学问题!
假设我们有:
$first = "3707682248186045564102137590742467172304310498516787723642221858460240158712832";
$second = "23846232839228381";
$result = bcmod($first,$second);
echo $result;
// $result = 3433268;
Run Code Online (Sandbox Code Playgroud)
如果只有$ result和$ second值,如何计算$ first变量(如果我们不知道它)?
实际上不是确切的价值,但应该接近它,所以做的时候
bcmod($first, $second);
Run Code Online (Sandbox Code Playgroud)
它会将$ result值等于3433268
是,
bcmod('3433268',$second);
Run Code Online (Sandbox Code Playgroud)
还给出了3433268!
我感谢你的帮助,谢谢你们!
php ×4
cron ×1
cryptography ×1
css ×1
get ×1
html ×1
javascript ×1
jquery ×1
math ×1
mime-message ×1
while-loop ×1