草庐IT

non-existing

全部标签

PHP TCPDF 错误 : Unable to create output file the folder exist and has the right permissions

我正在尝试使用html2pdfPHP类保存pdf文件。代码是这样的:$this->html2pdf->Output('directory/file_name.'.pdf','F');但我总是遇到这个错误TCPDFERROR:Unabletocreateoutputfile文件夹'folder'(名称是一个例子,很明显)存在并具有正确的权限!我试图省略文件夹名称,但无论如何都会出现此错误...谁能帮帮我? 最佳答案 那是因为您的文件夹没有适当的权限。请更改您的目录权限。在Linux中,您将像下面提到的那样执行此操作。chmod-R07

php - fatal error : Call to a member function rowCount() on a non-object

我在我的登录中使用PDO(按照之前通过sqli的指示),我已经尝试了以下操作,但是我遇到了这个fatalerror,并且无法弄清楚要给它什么,所以它满足了错误:if($query->rowCount()>0){//sessionstuff//refreshpage}然后我试了一下:if($query->rowCount()==1){//sessionstuff//refreshpage}但我仍然得到这个:fatalerror:调用非对象上的成员函数rowCount()这是我在更改之前开始的内容:$count=$query->rowCount();最后,这是一个更好的片段,因此您可以了解

php - Laravel 5.1 - 表格 : Method number does not exist

我刚刚升级到Laravel5.1,我正在创建一个带有“文本”和“数字”输入的简单表单。当我需要将我的输入字段之一声明为数字时,我的问题就来了:{!!Form::number('otp',null,['class'=>'form-control','placeholder'=>'OTP'])!!}它输出这个错误:方法号不存在。上瘾了,我没有在文档中看到“Html和表单”部分,他们似乎将其删除了。有人在Laravel5.1上遇到过我同样的问题吗? 最佳答案 你可以使用{!!Form::input('number','otp',null,

PhpStorm - 如何检测 PHP 错误 "Non-static method should not be called statically"?

在PHP中,静态方法既可以在静态方法中使用,也可以在非静态方法中使用,非静态方法只能在非静态方法中使用。这就是静态调用动态方法会生成E_STRICT错误的原因。例如:bar();//Staticcallonanon-staticmethod//PHPError"Strictstandards:Non-staticmethodshouldnotbecalledstatically"//ERRORNOTDETECTEDBYPHPSTORM!echoExample::foo();最后一行将生成此PHP错误(这是逻辑):我目前正在开发一个大型PHP应用程序,该应用程序在某些PHP文件中静态调用

php - 在 Symfony 中路由 "does not exist",即使它是在主路由文件中声明的

相关文件内容如下:app/config/routing.yml的内容:horse_route:path:/horsedefaults:{_controller:AppBundle:Horse:show}app:resource:"@AppBundle/Controller/"type:annotationsrc/AppBundle/Controller/WalrusController.php的内容:redirectToRoute('/horse',array(),301);}}src/AppBundle/Controller/HorseController.php的内容:当我在浏览器

php - array_key_exist() 以数组为键

我正在尝试检查一个数组中是否存在另一个数组的任何值。函数array_key_exist()看起来像我正在搜索的内容,但我不明白如何将函数的键值作为数组提供。这是代码:$risultato_query_controllo_numero=mysql_query($query_controllo_numero);$voucher_esistenti=array();while(($row=mysql_fetch_assoc($risultato_query_controllo_numero))){$voucher_esistenti[]=$row['numero'];}用数字填充第一个数组:

php - "assets:install"命令失败,错误为 "The target directory "web "does not exist",为什么?

我正在Docker容器中运行Symfony3应用程序。我创建了一个包含所有资源(js、css、图像)的CommonBundle。此资源符号链接(symboliclink)到另一个路径,如下所示:$dockerexec-uwww-data-itdockeramp_php_1ls-laoneview_symfony/src/CommonBundle/Resources/publictotal8drwxrwsr-x2www-datawww-data4096Feb2321:09.drwxr-sr-x5www-datawww-data4096Feb2320:54..lrwxrwxrwx1root

php - 上传未保存的文件时为 "Trying to get property of non-object"

我有一个模型具有使用OctoberCMS的system_files的文件关系。public$attachOne=['return_file'=>['System\Models\File','public'=>false,'delete'=>true]];在fields.yaml中我有表格return_file:label:AttachFiletype:fileuploadmode:filespan:right现在,在保存之前或之后,我想将图像从其目录移动到我的插件中的自定义目录。afterSave()似乎没有检索文件路径来移动它。但是在system_files中我看到在MySQLwor

php - file_exists() 用于文件名中包含 (&) 的文件

$filename="Sara&I.mp3";if(file_exists($filename)){...}如果文件名有“&”,PHP不会为file_exists返回true如何在$filename中转义“&”以使file_exists正常工作?已经尝试过urlecode()、urlrawencode()、htmlentities(),并使用反斜杠转义“&”(\&)...不行附言。这是在运行RedHat5的linux系统上提前致谢 最佳答案 这些文件是用户上传的吗?我通常将任何上传的文件重命名为仅使用字母A-Z、数字0-9和_或-加

php - fatal error : Call to a member function close() on a non-object. MySQLi 问题

当我上传到实时服务器时出现以下错误。它在本地主机上工作正常,我认为这很奇怪。Fatalerror:Calltoamemberfunctionclose()onanon-object....它引用的行$stmt->close();与数据库的连接$connection=newmysqli($MYSQL_HOST,$MYSQL_USER,$MYSQL_PASS,$DB)ordie(mysqli_error($connection));类本身。functiongetTimes(){//thismethodjustpullstheresultsofthequeryandreturnsthemas