草庐IT

is_readable

全部标签

php - 错误 : Could not parse for environment production: Is a directory - with vagrant and puphpet

我确定我遗漏了一些简单的东西,但在运行vagrantup时出现此错误。==>default:Error:Couldnotparseforenvironmentproduction:Isadirectory-/tmp/vagrant-puppet/manifests-75f35e3bc7e32744860c4bb229c88812onnodelocal.company.com==>default:Error:Couldnotparseforenvironmentproduction:Isadirectory-/tmp/vagrant-puppet/manifests-75f35e3bc7

php - 无法与主机 mailtrap.io 建立连接 [php_network_getaddresses : getaddrinfo failed: No such host is known. #0]

我遇到以下错误:Connectioncouldnotbeestablishedwithhostsmtp.gmail.com[php_network_getaddresses:getaddrinfofailed:Nosuchhostisknown.0]我的.env文件如下所示:MAIL_HOST=smtp.gmail.comMAIL_PORT=587MAIL_USERNAME=xxxxxxxxxxxxxxMAIL_PASSWORD=xxxxxxxx#MAIL_ENCRYPTION=null配置中的mail.php文件如下所示:/*|----------------------------

php - (int) 和 is_int() 是否可以安全地防止 SQL 注入(inject)?

所以我想知道这是否足以确保用户不会进行任何SQL注入(inject)并且数字将只是且始终是整数?getArticle函数中的$id绑定(bind)到SQL查询。getArticle($id)?>据我测试,它运行良好,但由于我不完全确定我宁愿问你guyz!好的,人们说准备好的语句可以解决问题。他们真的会吗?比如,我能完全确定如果将参数绑定(bind)为整数,它将是整数吗?提前致谢! 最佳答案 您可以简单地将它们转换为正确的类型:$number=intval($_GET['id']);$string=mysql_real_escape_

php - is_null 函数在我的 if 语句中无法正常工作

我有一个if语句来检测用户是否登录并属于某个部门。这真的很简单。有一个Permissions.php类,如果登录或返回NULL,则返回User对象。protected$user=NULL;...publicstaticfunctioninstance(){if(!self::$instance){self::$instance=newPermissions();}returnself::$instance;}...publicfunctionget_user(){return$this->user;}然后是user.php类,它具有返回他们所在部门的函数:publicfunctioni

php - is_date() 出现故障

我有一个php方法可以检查一个传入的参数是一个日期。在这里:publicfunctionis_Date($str){if(is_numeric($str)||preg_match('^[0-9]^',$str)){$stamp=strtotime($str);$month=date('m',$stamp);$day=date('d',$stamp);$year=date('Y',$stamp);returncheckdate($month,$day,$year);}returnfalse;}然后,我像这样试驾它:$var="100%";if(is_Date($var)){echo$va

Bean named ‘redisTemplate‘ is expected to be of type ‘org.springframework.data.redis.core.StringRedi

本文将讲解:该错误的解决办法@Resource和@Autowired两个注解的区别@Autowired这个注解注入的字段爆红今天在引入redis作为缓存中间件的时候,出现了这个错误,org.springframework.beans.factory.UnsatisfiedDependencyException,其实就是我们自动注入的时候报的错误,使用@Resouce这个注解,因为这个注解我们是先通过名字去匹配的,然后再通过type去匹配的报错详细信息:Beannamed'redisTemplate'isexpectedtobeoftype'org.springframework.data.re

php - Ratchet/When.js : "Uncaught ReferenceError: module is not defined"

我正在尝试使用ratchet来实时反射(reflect)对我的数据库所做的更改。我使用了推送器应用程序的代码(http://socketo.me/docs/push)。但我在这方面遇到了错误。我打开客户端页面的那一刻:UncaughtReferenceError:moduleisnotdefinedwhen.js:900(anonymousfunction)when.js:900(anonymousfunction)when.js:15(anonymousfunction)when.js:900在此之后我输入:conn.subscribe('主题');//这订阅了主题。现在,当我对此主

php - 如何修复 : "Sensio\Bundle\FrameworkExtraBundle\Configuration\Route" is deprecated

Symfony版本:4.1当我使用PHPUnit运行测试时,出现以下弃用消息:Theannotation"Sensio\Bundle\FrameworkExtraBundle\Configuration\Route"isdeprecatedsinceversion5.2.Use"Symfony\Component\Routing\Annotation\Route"instead.我想澄清一下,我在framework.yaml中放入了:sensio_framework_extra:    router:        annotations:false我还想澄清一下,我的Controll

php - "Given URL is not whitelisted in Client OAuth Settings"在 Facebook 登录测试主机

我正在使用FacebookPHPSDK实现facebook登录。我想先在本地测试它。我创建了一个测试应用程序并尝试了很多东西,但仍然不适合我。在我的本地我配置了一个apache虚拟主机,这样我就可以使用这个url访问我的本地网络应用程序:http://www.myapplocal.com这是我在使用facebook登录后遇到的错误:GivenURLisnotwhitelistedinClientOAuthSettings:ThisredirectfailedbecausetheredirectURIisnotwhitelistedintheapp’sClientOAuthSetting

php - 新的 Laravel (Homestead) 安装 : 502 Bad Gateway - *Refresh* - the website is displayed correctly

我试图建立一个本地Laravel项目。所以我决定使用Homesteadvagrantbox。在我像thisTutorial一样安装了整个东西之后我期待在浏览器中看到结果:第一个显示是nginx502BadGatewayError。所以我尝试刷新它,然后显示默认的Laravel起始页面。然后我制作了一些路由和链接到我网站的一些子页面,每次我更改我的页面(通过链接或输入get请求)我都会得到“502BadGateway”,它会在网站刷新后消失。我试过:更改php版本(likehere)使缓冲区更大(likehere)完全重新安装了我的vagrant和VirtualBox使用其他浏览器使用我