草庐IT

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 - 错误 : 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

用于 url 验证的 PHP 正则表达式,filter_var 过于宽松

首先让我们根据我的要求定义一个“URL”。唯一允许的可选协议(protocol)是http://和https://然后是强制性域名,例如stackoverflow.com然后可选择其余的url组件(path、query、hash、...)根据我的要求引用有效和无效网址的列表有效stackoverflow.comstackoverflow.com/questions/askhttps://stackoverflow.com/questions/askhttp://www.amazon.com/Computers-Internet-Books/b/ref=bhp_bb0309A_comin

PHP 的 filter_var,它是一个很好的现代解决方案吗?

filter_var()的可靠性如何?你觉得有用吗?它是验证用户输入的好解决方案吗? 最佳答案 虽然我还没有在任何项目中使用过它,但我已经尝试了一下,我尝试过的所有过滤器似乎都工作得很好——而且它比我目前使用的凌乱的正则表达式更优雅的解决方案采用。我当然认为这是一个非常有用的功能,我将来肯定会使用它。 关于PHP的filter_var,它是一个很好的现代解决方案吗?,我们在StackOverflow上找到一个类似的问题: https://stackoverfl

php - 如何以编程方式设置 SVN 存储库 "on the fly"?

我正在建立一个系统(基于PHP),让用户立即提供一个SVN环境以供使用。这是一个内部项目,因此用户主要是内部用户。我什至不知道从哪里开始。是否有用于PHP的SVN绑定(bind),或者我是否必须使用svn控制台命令? 最佳答案 这是一种可能性。您将在这里执行几个步骤。首先,您需要在PHP操作脚本中创建svn存储库,可能类似于:$name=$_REQUEST['name'];//gonnaneedsomesanitycheckingon$namehere.no'..',no'/'s,etc$cmd='svnadmincreate'.e

如果在函数调用中分配了 var,PHP 将忽略通过引用传递

我有两个功能functionc(&$x){$x=25;echo'ciscalled,x='.$x.PHP_EOL;}functionb(){echo'biscalled'.PHP_EOL;return5;}然后我编写了下面的代码,正如我所期望的那样,它应该将b()的结果放入$o,然后通过引用将$o传递给c()并将其设置为新值。它工作正常:$o=b();c($o);echo'ois'.$o;输出符合预期:biscalledciscalled,x=25ois25但是如果我尝试在这样的函数调用中分配$o的值:c($o=b());echo'ois'.$o;我得到奇怪的输出biscalledci