草庐IT

zend-file

全部标签

php - 让 Zend Framework 2 Memcached 工作

我正在尝试创建一个新的(已配置并可以使用)Zend\Cache\Storage\Adapter\Memcached并得到一个错误:File:[project]/vendor/zendframework/zendframework/library/Zend/Cache/Storage/Adapter/MemcachedResourceManager.php:52Message:Noresourcewithid'default'Module类classModuleimplementsConfigProviderInterface,ServiceProviderInterface,Autol

php - Zend Framework 2 应用程序中 composer.phar self 更新的 Composer\Downloader\TransportException

我正在尝试更新项目中的ZendFramework2库并遇到异常:use@machine:/path/to/project#phpcomposer.pharself-update[Composer\Downloader\TransportException]The"https://getcomposer.org/version"filecouldnotbedownloaded(HTTP/1.1502BadGateway)也试过了so,但错误仍然存​​在:use@machine:/path/to/project#curlhttp://getcomposer.org/installer|ph

php - Zend Framework 中的跨域 ajax 操作

我的应用程序(A)需要通过AJAX(Fineuploader库)将文件上传到我的子域(B)(物理上是其他服务器)。我的解决方案是什么:在B上设置header以允许来自A的请求。请参阅以下Controller操作代码:publicfunctionimageAction(){$this->_response->setHeader('Access-Control-Allow-Origin','http://'.Zend_Registry::get('config')->main_server->path);$this->_response->setHeader('Access-Control

php - 组件安装错误 : JInstaller: :Install: File does not exist

我只是按照这个video创建了一个组件.我创建了名为admin.zip的组件。我在joomla3.0中安装时收到以下警告。WarningJInstaller::Install:FiledoesnotexistC:\wamp\www\Content\tmp\install_52009de34a2c1\site\language\en-GB.com_helloworld.iniJInstaller::Install:FiledoesnotexistC:\wamp\www\Content\tmp\install_52009de34a2c1\admin\language\en-GB.com_h

php - imagick readImageBlob 给出 'uable to open file' 错误

我收到以下错误:PHPfatalerror:未捕获的异常“ImagickException”,消息“无法打开图像`/tmp/magick-2244K7gyKdSJDqKW':/var/www/中没有这样的文件或目录@error/blob.c/OpenBlob/2658”nodeviz-read-only/www/NodeViz/library/GraphVizExporter.php:454引用的相关代码在这里:$im=newImagick();$im->setFormat('svg');#removelabelsfromtherasterversion$im->readImageBl

php - 将 Zend 1 包装到 Symfony 2 中。如何共享 session ?

在我的工作中,我们正在努力将Zend1应用程序迁移到Symfony2。我试图弄清楚如何无害地完成这项工作。我找到了以下SF2bundle:https://github.com/mainlycode/Zf1WrapperBundle.我安装了它,按照配置说明进行操作,将我的Zend应用程序复制到/vendor/zend中,一切正常。当我浏览我的旧登录路由时,SF2无法理解并询问Zend的响应,然后出现我的登录表单。我可以登录,并且可以正常工作,网站的授权部分显示正确。现在我想开始修改需要对用户进行授权的功能。所以我创建了一个新的SF2包,称为BackendBundle。它在我的Contr

php - Zend Framework 2 中特定于错误 View 的成员

试图找到标准$this成员的列表,特定于ZF2错误处理程序View,例如display_exceptions或exception但没有成功。这些名称仅出现在代码示例中,未出现在ZF2文档中。是否有$this成员的列表,在View/错误View中可用,或者获取它的唯一方法是挖掘ZF2源代码? 最佳答案 据我所知,唯一可用的变量是分配给View模型的变量。在错误处理程序的情况下,执行此操作的是异常策略。对于一般异常(exception)情况:https://github.com/zendframework/zf2/blob/master

php - 查找并替换 html(Zend_Dom_Query+createElement()) : Call to a member function createElement() on a non-object

我需要在html代码中查找并替换一些html元素(我遵循了这个答案:GettinganelementfromPHPDOMandchangingitsvalue),为此我检索了内容:$transport=$observer->getTransport();$html=$transport->getHtml();$dom=newZend_Dom_Query($html);$document=$dom->getDocument();这是结果:TitleItems2to2of2totalShow1perpagePage:12Viewas:Grid List SortByPo

php - Behat:Goutte/Guzzle 通过 cURL "Warning: curl_setopt_array(): 3607 is not a valid File-Handle resource"下载文件

使用Behat测试一些涉及下载文件的行为。使用Goutte和Guzzle拦截文件下载,以便我可以在另一步骤中与其进行交互。//Wheretoputthefile$tmpFile='download.zip';$handle=fopen($tmpFile,'w');$goutteDriver=$this->getSession()->getDriver();$goutteClient=$goutteDriver->getClient();/**@var\Guzzle\Http\Client$guzzleClient*/$guzzleClient=$goutteClient->getCli

php - file_get_contents 不在本地主机上工作,但在在线网络服务器上工作

$json=file_get_contents('http://localhost/hts2015/data/functions.php?tag=FIND');$json=file_get_contents('http://www.hptsprofessional.tk/data/functions.php?tag=FIND');$jsonD=json_decode($json);$no=count($jsonD);2014年,我在我的本地主机上使用相同的代码通过file_get_contents()访问数据。它对我来说工作正常,它可以在本地主机上工作,也可以通过更改url在在线服务器