草庐IT

check_length

全部标签

php - 在 codeigniter 中验证 max_length、min_length

尝试在CodeIgniter中为min_length和max_length验证约束设置自定义验证消息时出现错误。这些是我的验证规则:$this->form_validation->set_rules('username','Username','required|xss_clean|min_length[6]|max_length[10]');$this->form_validation->set_rules('password','Password','required|min_length[8]|max_length[20]';这些是我的自定义验证消息:$this->form_va

un-/check c#treeview中的行为

我在Treeviews中发现了很多关于树视图和复选框...但是一件事似乎是没有被认为的。我有我的树景[x]FooL[x]OneL[x]TwoL[x]Three[x]BarL[]OneL[x]TwoL[x]Three[]HelloL[]OneL[]TwoL[]Three现在,当我检查父母复选框时,例如Foo比所有孩子都被选中。他们也因取消选中而取消了选择Foo。为此,我有这种方法privatevoidTreeView1_AfterCheck(objectsender,TreeViewEventArgse){foreach(TreeNodechildNodeine.Node.Nodes){chil

php - 如何摆脱 GET 请求的 "You must configure the check path to be handled by the firewall"错误?

当我以通常的方式(使用登录表单)进行身份验证时,一切正常。仅当通过GET方法直接访问/check_form时,我才会收到此错误,在这种情况下会抛出异常:Youmustconfigurethecheckpathtobehandledbythefirewallusingform_logininyoursecurityfirewallconfiguration.这是相关的security.yml部分:firewalls:acme_area:pattern:^/(acme|admin)/provider:fos_userbundleform_login:provider:fos_userbun

PHP 警告 : POST Content-Length of n bytes exceeds the limit of 3145728 bytes in Unknown on line 0

我很惊讶地在我的错误日志中发现上述错误,因为我认为我已经完成了必要的工作来捕获我的PHP脚本中的错误:if($_FILES['image']['error']==0){//goaheadtoprocesstheimagefile}else{//determinetheerrorswitch($_FILES['image']['error']){case"1":$msg="Uploadedfileexceedstheupload_max_filesizedirectiveinphp.ini.";break;....}}在我的PHP.ini脚本中,相关的设置是:memory_limit=1

php - 密集的 PHP 脚本失败 w/"The timeout specified has expired"错误/ap_content_length_filter

运行失败的MySQL密集型PHP脚本。Apache日志报告如下:[WedJan1300:20:102010][error][clientxxx.xx.xxx.xxxx](70007)Thetimeoutspecifiedhasexpired:ap_content_length_filter:apr_bucket_read()failed,referer:http://domain.com/script.php尝试将set_time_limit(0)放在顶部。还尝试了set_time_limit(0)都没有修复超时。我可以在http.conf(或其他地方)中设置一些特定的超时限制来防止这

php - Laravel 验证 : check why validator failed

是否有办法检查验证器是否因unique规则而失败?$rules=array('email_address'=>'required|email|unique:users,email','postal_code'=>'required|alpha_num',);$messages=array('required'=>'The:attributefieldisrequired','email'=>'The:attributefieldisrequired','alpha_num'=>'The:attributefieldmustonlybelettersandnumbers(nospaces

PhpMailer SMTP 通知 : EOF caught while checking if connected

我遇到了phpMailer的问题,我无法发送任何电子邮件,它给了我这个错误:2016-03-0321:32:09SERVER->CLIENT:2016-03-0321:32:09SMTPNOTICE:EOFcaughtwhilecheckingifconnected2016-03-0321:32:09SMTPError:Couldnotauthenticate.2016-03-0321:32:09SMTPconnect()failed.https://github.com/PHPMailer/PHPMailer/wiki/TroubleshootingErreur:SMTPconnec

php - 在 Symfony 2 中找不到多个防火墙的 check_path

我正在尝试在Symfony2中设置后端和前端防火墙系统。我有两种登录表单,一种用于前端,另一种用于管理控制面板。不同的供应商等等。我的配置如下所示:security:firewalls:backend:pattern:^/adminanonymous:trueprovider:admin_usersform_login:login_path:/admin/logincheck_path:/admin/login_checkdefault_target_path:/adminsecured_area:pattern:^/provider:normal_usersanonymous:tru

php - 创建 PHP API : Checking from which server the API Request comes from

我正在为一个网站创建一个PHPAPI,我想限制API对在我们服务器上注册的域的访问(以防止滥用API使用)。所以,这是我现在的方法,嗯,它在纸面上看起来应该很不错。API在api.example.com上设置。想要使用API的用户向我们注册,添加他的域并获得APIkey。API的用户将使用他的APIkey加密他的请求数据(通过mcrypt)并通过cURL将其发送到api.example。com.我的服务器检查此API请求来自哪个域,并将该域与数据库中的APIkey匹配。如果有APIkey,API会使用该key通过mcrypt解密请求,然后使用相同的方法加密并发送结果。我卡在了第4步。最

php - 使用哪个 Auth::check() 或 Auth::user() - Laravel 5.1?

如果我想检查用户是否在我的Laravel5.1应用程序中登录,我可以使用if(Auth::user()){...}或if(Auth::check()){...}在检查用户是否登录时,是否有理由偏爱其中一个? 最佳答案 Auth::check()遵循Auth::user()。从我记事起就是这样。换句话说,Auth::check()调用Auth::user(),从中获取结果,然后检查用户是否存在.主要区别在于它会检查用户对您来说是否为null,以便您获得bool值。这是检查函数:publicfunctioncheck(){return!