草庐IT

time_zone_select

全部标签

php - fatal error : Maximum execution time of 30 seconds exceeded when i execute daily run from my website

我正在使用来自网站供应商的phpMyAdmin。我似乎无法编辑php.ini设置页面。那么在哪里设置ini_set('max_execution_time',300);?在我的Php编码页面中?或任何设置页面? 最佳答案 如果您不能编辑php.ini配置,那么您可以在您的PHP页面顶部设置以下内容:ini_set('max_execution_time',300);//300seconds=5minutes//ORset_time_limit(300);//Ifsettozero,notimelimitisimposed.注意:se

php - WeBid : Timezones with daylight savings time not calculated correctly

我目前正在使用一个开源应用程序:WeBid(可用here)问题是:用户在数据库中存储了首选时区该站点在数据库中存储了一个默认时区所有数据库存储的日期都存储在“GMT-0”应用程序无法正确计算DST(夏令时),因为它使用了以下代码:(包括/functions_global.php)$this->ctime=time()+(($this->SETTINGS['timecorrection']+gmdate('I'))*3600);$this->tdiff=($this->SETTINGS['timecorrection']+gmdate('I'))*3600;gtpotyf解释说:gmda

php - 多选字段 - 多次使用选定的 ="selected"

我有一个这样的多字段:multi_group_select_options($group_ids,$excluded_id);?>我设法通过这个函数从数据库中获取结果并将它们放入中,但我无法设法保持选中的值。第一个参数应该加上selected="selected"对于在提交前标记然后提交的字段,第二个参数阻止显示group_id(第二个参数按应有的方式工作)。这里是函数.../***group_options*Getgroupnamesinthedropdownlist*/publicfunctionmulti_group_select_options($default=false,$

php - set_time_limit 不起作用

我在php中有一个bigint类,用于计算大数。它运作良好,除了时间限制。我设置了时间限制set_time_limit(900);在我的bigint.php文件中,它在本地主机上工作。但是在我的虚拟主机中,当我尝试计算999^999时,它会产生错误Fatalerror:Maximumexecutiontimeof10secondsexceededin/home/vhosts/mysite.com/http/bigint/bigint.phponline156这是我的代码:publicfunctionMultiply_Digit($digit){//classfunctionofbigi

php - 使用php的下拉菜单中的"selected"

$options1=array(1=>'=Equals','≠DoesnotEqual','>Isgreaterthan','≥Isgreaterthanorequalto','';foreach($options1as$i1=>$opt1):echo''.$opt1.'';endforeach;echo'';$entry_id_selector_topic=$_POST['entry_id_selector'];这部分代码有什么问题.($i1==$entry_id_selector_topic).'?“已选择”:“”默认值为=Equals例如,用户选择>Isgreaterthan然后

php set_time_limit 小于一秒

问题很简单,我想检查一个数据库以向网站访问者提供定制内容,但如果此功能执行时间超过800毫秒,则故障转移并提供一个通用页面。(服务器响应的目标时间为1000毫秒)。我看过set_time_limit函数,但是这需要一个以秒为单位的整数作为参数。我的问题:是否有类似的东西可以用于小于1秒的值?我正在寻找类似的东西:voidset_time_limit_ms(int$milliseconds)set_time_limit_ms(800) 最佳答案 不存在。你可以用一个tick函数来模拟它:declare(ticks=1);//ormor

php - 拉维/Javascript : populate a select/dropdown after a different select/dropdown is selected

我正在寻找一种解决方案,以便在从另一个下拉列表(例如下拉列表1)中选择一个选项时填充下拉菜单/选择(例如称为下拉列表2)。例如,从下拉列表1中选择Toyota将在下拉列表2中填充丰田的型号,例如卡罗拉、凯美瑞等。或者另一个例子——在一个下拉列表中选择一个国家将在另一个下拉列表中填充该国家的不同城市。我使用laravel作为我的框架,所以重要的是我的解决方案(a)在laravel中工作并且(b)从mysql数据库中获取结果,而不仅仅是一个硬编码的值数组。我已尝试从此处的帖子中实现解决方案:http://forums.laravel.io/viewtopic.php?pid=40028但它

php - request_terminate_timeout 是否会覆盖 max_execution_time?

PHP-FPM池定义中的request_terminate_timeout是否会覆盖php.ini文件中的max_execution_time? 最佳答案 显然他们都在不同的层次上做同样的事情。max_execution_time由PHP本身提供,request_terminate_timeout由FPM进程控制机制处理。因此,无论哪个设置为最低值,都将首先启动。Apache还具有它观察到的空闲超时参数,并会在该时间后放弃PHP进程。还有maximumexecutiontimeisnotaffectedbysystemcalls,s

php - Zend 框架 2 : Set options as "selected" in select list

我正在尝试将第二个产品设置为在列表中选中,但下面的代码不起作用。任何的想法。谢谢$this->add(array('type'=>'Zend\Form\Element\Select','name'=>'manufacturer','options'=>array('label'=>'Manufacturername','value_options'=>$this->getManufacturer(),'empty_option'=>'---selectmanufacturer---',),'attributes'=>array('value'=>2,'selected'=>true,)

php - <b> fatal error </b> : Uncaught exception 'Exception' with message 'Failed to connect to api.twitter.com port 443: Connection timed out'

我正在开发一个Codeigniter项目,在该项目中我使用twitterapi库来获取twitter数据。在我更改服务器之前它工作得很好,但是在更改服务器之后它产生了以下错误。我不知道问题所在。Fatalerror:Uncaughtexception'Exception'withmessage'Failedtoconnecttoapi.twitter.comport443:Connectiontimedout'in/my/project/path/myProject/application/ws/libraries/TwitterAPIExchange.php:297Stacktrac