草庐IT

opening_time

全部标签

php - 导致 'Fail to open page' 的 Slim PHP 框架

我已经使用SlimPHP框架设置了一个RESTAPI,它在使用请求时完美运行,即http://mysite.com/class/id.但是当我导航到http://mysite.com/时,我在Safari中收到以下错误:Safarican’topenthepage“http://mysite.com/”.Theerroris:“cannotdecoderawdata”(NSURLErrorDomain:-1015)PleasechooseSafari>ReportBugstoApple,notetheerrornumber,anddescribewhatyoudidbeforeyous

php - Codeigniter:与子域和 sess_time_to_update 共享 session

关于如何在子域之间或域与子域之间共享CI原生session存在很多问题。只是其中的一些:1,2,3每个人都说我们应该这样定义$config['cookie_domain']$config['cookie_domain']=".example.com";这似乎是正确的答案,但是......子域在两个域上更新时丢弃数据(值$config['sess_time_to_update']=300;)。在sess_time_to_update过期后,所有数据都会被丢弃。附加信息:CodeIgniter版本。2.1.4子域和域使用相同的文件(别名)。$config['sess_use_databas

PHP 警告 : require_once(/var/www/html/wp-config. php) : failed to open stream: Permission denied in/var/www/html/wp-load. php on line 37

我正在apache上创建一个Wordpress应用程序服务器,在访问url时收到错误500。因此,我确实检查了httpd/logs/error_log,以下是错误[SunJan1522:42:54.4403492017][:error][pid767][client10.203.116.148:9173]PHPWarning:require_once(/var/www/html/wp-config.php):failedtoopenstream:Permissiondeniedin/var/www/html/wp-load.phponline37[SunJan1522:42:54.44

php - file_put_contents(.../bootstrap/cache/services.json) : failed to open stream: No such file or directory

我在运行任何phpartisan命令时一直收到此错误。[ErrorException]file_put_contents(/Applications/MAMP/htdocs/code/bheng/md-bheng/bootstrap/cache/services.json):failedtoopenstream:Nosuchfileordirectory我该如何阻止它? 最佳答案 编辑-如果services.json文件不存在,运行phpartisanserve然后停止强制创建文件。请参阅:laravelservices.jsonn

php - 从 Windows 上的 proc_open() 捕获 stderr 输出

我正在调用proc_open(),但无法捕获写入stderr的进程输出:$curFolder=getcwd();$procDescriptor=array(2=>array("pipe","w"));$cmd="MyApp.exe-foptimization.csv";$process=proc_open($cmd,$procDescriptor,$pipes,$curFolder);if(is_resource($process)==true){$procStatus=proc_get_status($process);while($procStatus['running']===t

PHP 执行时间超过 max_execution_time... 有时

我有一个PHP类,调用后将时间限制设置为60秒。这个类唯一的特别之处在于它使用了curl_multi_exec()。set_time_limit(60);ini_set('max_execution_time',60);问题是在Apache的/server-status页面下,这个页面和另一个使用单线程curl的页面有时会超过它们的max_execution_time并达到200秒!我错过了什么?有没有办法设置Apache终止运行时间超过90秒的脚本(甚至连接)? 最佳答案 来自themanual:Theset_time_limit

php - 绕过 max_execution_time?

我的服务器上有10秒,这对我想要做的事情来说还不够。它也被网络托管商禁用了。如果在执行了一定时间后,我执行了一个单独的PHP页面,这算在同一时间还是在该页面上重新开始?还有别的办法吗? 最佳答案 绕过最大执行时间的简单方法是像这样设置时间限制:设置时间限制(0); 关于php-绕过max_execution_time?,我们在StackOverflow上找到一个类似的问题: https://stackoverflow.com/questions/7318825

php - 如何调试 "Maximum execution time" fatal error ?

我正在尝试在我的应用程序中使用Zend_acl。我遵循了“ZendFrameworkinaction”一书。我添加了这个助手:_auth=Zend_Auth::getInstance();$this->_acl=$options['acl'];//var_dump($this->_acl);die();}publicfunctioninit(){$this->_action=$this->getActionController();//addresourceforthiscontroller$controller=$this->_action->getRequest()->getCon

php - Joomla tmp 文件夹不可写?或 open_basedir 的麻烦?

我正在这个joomla网站上工作,我无法上传任何扩展。如果我使用普通的上传方法,我会得到JFolder::create:Couldnotcreatedirectory无法创建目的地如果我使用从目录上传,我会得到CopyfailedJInstaller::Install:复制文件失败我已经尝试了在joomla支持论坛中找到的许多解决方案,但没有一个对我有用。无奈之下,我什至将tmpermissions更改为777,现在目录权限(我知道它不好)列表显示tmp是可写的,但显示警告ThePHPtemporarydirectoryisnotwriteablebytheJoomla!例如,在尝试将

php - 调用未定义函数 printer_open()

我正在尝试通过此代码连接到我在另一台机器上的打印机$handle=printer_open("\\\\xxx.xxx.xxx.xxx\\CanonMF4320-4350");if($handle)echo"connected";elseecho"notconnected";得到错误Fatalerror:Calltoundefinedfunctionprinter_open()inC:\wamp\www\print\index.phponline3我已经安装了php_printer.dll,但它没有在phpinfo()下显示。使用PHP版本5.3.0我怎样才能连接到打印机并使我的prin