草庐IT

the_table

全部标签

php - 发送 : How to manage XML data where multiple elements have the same name using Zend_Config_Xml?

尝试使用Zend_Config_Xml从XML文件中提取数据,我正在寻找处理多个元素具有相同名称的数据的最佳方法。请看下面的例子。这是XML文件:example1.cssexample2.css代码如下:$data=newZend_Config_Xml('./path/to/xml_file.xml','stylesheets');$stylesheets=$data->stylesheet->toArray();我想做的是遍历$stylesheet使用foreach循环的数组,提取文件名,然后将样式表附加到headLink().这工作正常...但是,当的数量时,我遇到了问题元素小于2

php - Joomla : Can a super administrator get the ftp password of that site (from configuration file or any other way)?

我可以作为super管理员访问joomla1.5制作的网站后端。现在我想做的是,关闭该站点并将一个简单的html文件设置为站点主页。为此,我认为我需要ftp用户/密码。有什么办法可以从joomla后端获得该通行证吗?我可以在帮助>系统信息>配置文件中看到一些条目,其中$ftp_user:'xxxxxx'和$ftp_pass:'xxxxxx'。有没有办法知道这些值?即使我无法获得ftp用户/密码,我能否以某种方式使用joomla后端编辑/浏览任何文件/目录? 最佳答案 是的,如果FTP用户/密码保存在Joomlaconfigurati

php - PHP : The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect 中的 FreeTDS 错误

我必须使用ODBC从ArchLinux连接到MSSQL服务器。我使用FreeTDS,并使用isql,它可以正常工作:isqlsqlexpressdev开发但不是在PHP中。我在交互模式下使用PHP:PHP>$conn=odbc_connect("sqlexpress",'dev','Dev');PHP>$a=odbc_exec($conn,'SELECT*FROMmeasures;');PHPWarning:odbc_exec():SQLerror:[FreeTDS][SQLServer]Theincomingtabulardatastream(TDS)remoteprocedurec

php - 获取错误无法加载资源 : the server responded with a status of 413 (Request Entity Too Large) on ajax upload

我在尝试上传大小超过1MB的文件时遇到以下错误加载资源失败:服务器在ajax上传时返回状态413(请求实体太大)实时链接:http://d.5me.net请帮助我如何解决这个问题?编辑PHPINFO:http://5me.net/phpinfo.php提前致谢 最佳答案 如果您使用的是nginx:在您的http、服务器或位置上下文中设置client_max_body_sizeXXm;。 关于php-获取错误无法加载资源:theserverrespondedwithastatusof413

php - 身份验证凭证未找到异常 : The security context contains no authentication token

我收到以下错误AuthenticationCredentialsNotFoundException:Thesecuritycontextcontainsnoauthenticationtoken.OnepossiblereasonmaybethatthereisnofirewallconfiguredforthisURL.我已经尝试过解决方案,因为我知道当没有为路由配置安全防火墙时会发生此错误,但我似乎无法解决该错误。这是我的security.ymlsecurity:access_decision_manager:#strategycanbe:affirmative,unanimous

php - 从 WP_List_Table 验证随机数

我正在使用WP_List_Table在WordPress插件中设置批量操作。我想允许的唯一批量操作是删除。我有一个链接可以删除通过生成的随机数的项目wp_create_nonce('deletePoll')当我点击链接时,它工作得很好。我在处理代码中验证它check_admin_referer('deletePoll');但是当我使用批量操作表单尝试删除时,我得到了“你确定要这样做吗?”消息。我查看了wp-admin/post.php以了解他们如何处理垃圾项目,它似乎完全一样,除了它有效。 最佳答案 为什么不用wp_verify_n

php - 错误 : You must use the "set" method to update an entry fix?

我使用codeigniter作为我的PHP框架,当我提交我的fromtopost到我的数据库时,我总是收到这个错误。Youmustusethe"set"methodtoupdateanentry我不太确定这是什么意思,从我看过的其他帖子来看,每个人都说数据映射器需要为对象分配一个值。由于我是新手,有人可以给我更好的解释吗。这是我的代码,它说我有错误:classAdd_bookextendsCI_Model{publicfunctionadd_book($data){$this->db->insert('ST_ITM',$data);}}?>谢谢。 最佳答案

php - Yii2错误: The view file does not exist

我已经使用Yii2几个星期了,并且掌握了它的窍门。然而,今天,由于我不知道的原因,Yii将我路由到错误的页面,导致错误,因为没有找到网页:URL:http://localhost/web/index.php?r=site/indexError:InvalidParameter–yii\base\InvalidParamExceptionTheviewfiledoesnotexist:C:\xampp\htdocs\views\site\index.php但是,自从我开始使用Yii2以来,我已经能够使用http://localhost/web/index.php?r=paramA/par

php - 正则表达式(php 中的 preg_match): last groups in the output array don't work correctly

使用这种模式:(howis\s)?(the\s)?(weather)\s?((on)\s)?(today|tomorrow|sunday|monday|tuesday|wednesday|thursday|friday|saturday|sunday|thisweek)?(\s(in)\s(.*)\s?(on)?\s?(today|tomorrow|sunday|monday|tuesday|wednesday|thursday|friday|saturday|sunday|thisweek)?)?这就是我要捕捉的东西输入:维也纳星期二的天气怎么样输出:array(100=>howis

php - 创建资源 : [message] fopen(): Unable to find the wrapper "https" on Ubuntu using Symfony 时出错

我正在尝试在Ubuntu17.04机器上安装Symfony3,但出现错误:[GuzzleHttp\Ring\Exception\RingException]Errorcreatingresource:[message]fopen():Unabletofindthewrapper"https"-didyouforgettoenableitwhenyouconfiguredPHP?[file]phar:///usr/local/bin/symfony/vendor/guzzlehttp/ringphp/src/Client/StreamHandler.php[line]406[messag