草庐IT

table_exists

全部标签

php - file_exists 或 getimagesize 仅适用于本地绝对文件路径,但不适用于 PHP 中的 URL

我最近更新了我的一台服务器,从那时起,我遇到了一些特定PHP命令的问题(见下文)。我相信这是一个配置问题,但我已经调查了几件事并且不知道更多。所以也许你们中的一个人有一个好主意:我使用以下代码来显示内部网站上的标准Logo或用户定义的Logo:if(L_HEADER){$logo=L_HEADER;}else{$logo='logo.png';}$properties=getimagesize(CONFIG_URL.'images/'.$logo)L_HEADER和CONFIG_URL是具有预定义值的常量(另一个文件):L_HEADER包含“opb_beta.png”CONFIG_UR

php - 运行 phpcs 时,错误 : Referenced sniff "PHPCompatibility" does not exist is coming

我想运行phpcs工具,但是这个错误来了,错误:引用的嗅探“PHPCompatibility”不存在我运行了phpcs-i。这给了我,安装的编码标准是PEAR、PSR1、Zend、Squiz、PSR12、PSR2、MySource和PHPCompatibility。但总是会出现这个错误,错误:引用的嗅探“PHPCompatibility”不存在。有什么原因吗? 最佳答案 根据当前PHPCompatibilityCodingStandard执行此步骤所需的文档:打开您的composer.json文件并将以下行添加到:"require-

php - Firestore : Key writes does not exist in the provided array

谁能告诉我,以下错误消息试图告诉我什么?Fatalerror:Uncaughtexception'InvalidArgumentException'withmessage'Keywritesdoesnotexistintheprovidedarray.'in/vendor/google/cloud/Core/src/ArrayTrait.php:38Stacktrace:#0/vendor/google/cloud/Firestore/src/Connection/Grpc.php(127):Google\Cloud\Firestore\Connection\Grpc->pluck('

php - Laravel 5 Eloquent 关系 : can't modify/overwrite relationship table property

我正在使用Laravel5的belongsToMany方法使用中间数据透视表定义相关表。我的应用程序使用Eloquent模型Tour和TourCategory。在Tour模型中,我有:namespaceApp;useIlluminate\Database\Eloquent\Model;classTourextendsModel{publicfunctioncats(){return$this->belongsToMany('App\TourCategory','tour_cat_assignments','tour_id','cat_id');}}在我的Controller中,我使用L

php - 扩展构建器中的 "Map to existing tables"在 TYPO3 中显示奇怪的问题

在我的扩展MyExt中,我将模型Page映射到TYPO3中的pages表。首先,它向我显示了typemismatch错误,无论如何我还是继续并保存了它。会发生以下情况:我的页面树变成了这样:我的新记录表只显示UID,不显示标题:我的页面编辑变成这样:在我的MyExt/Configuration/TypoScript/setup.txt中我有这个:config.tx_extbase.persistence.classes{Tx_MyExt_Domain_Model_Page{mapping{tableName=pages}}}这是一个错误吗?或者我做错了什么?这是我的/Domain/Mo

php - 逻辑异常错误 : Passed array does not specify an existing static method

请问我的autoloader类/函数与spl_autoload_register有任何错误吗?感谢您的帮助。这是我的代码我得到了这个错误Fatalerror:Uncaughtexception'LogicException'withmessage'Passedarraydoesnotspecifyanexistingstaticmethod(class'core'notfound)'inC:\xampp\htdocs\test\system\core.php:14Stacktrace:#0C:\xampp\htdocs\test\system\core.php(14):spl_auto

php - Bisna Doctrine 2.1 和 2.2 从未导入注释 "@Table"

我习惯将zendmvc与doctrine2.1和2.2一起使用,并与bisna驱动程序绑定(bind)在一起。对于新项目,我使用注释驱动程序只是为了方便(我没有)。我是如何从数据库中生成我的实体并尝试加载它们的,但它们一直在生成错误:[SemanticalError]Theannotation"@Table"inclassMyWheels\Entity\Bmulogwasneverimported.我尝试为它们添加ORM\前缀,但这并没有解决问题。我的配置文件读取的:[production]phpSettings.display_startup_errors=0phpSettings.

php - file_exists() 与 scandir() 的 in_array() 相比——哪个更快?

按照目前的情况,这个问题不适合我们的问答形式。我们希望答案得到事实、引用或专业知识的支持,但这个问题可能会引发辩论、争论、投票或扩展讨论。如果您觉得这个问题可以改进并可能重新打开,visitthehelpcenter指导。关闭9年前。假设我们有这样一个循环:foreach($entriesas$entry){//let'ssaythisloops1000timesif(file_exists('/some/dir/'.$entry.'.jpg')){echo'fileexists';}}我假设这必须访问HDD1000次并检查每个文件是否存在。改用这个怎么样?$files=scandir

php - BigQuery [PHP] InsertAll 错误 : No records present in table data append request

在我看来,除了此函数的最后一行外,一切正常。但似乎json(行)是问题所在......感谢任何帮助!错误:Google_Service_ExceptionErrorcallingPOSThttps://www.googleapis.com/bigquery/v2/projects/mtg/datasets/log/tables/v1/insertAll:(400)Norecordspresentintabledataappendrequest.表架构:raw_urlSTRINGNULLABLEendpointSTRINGNULLABLEparameterSTRINGNULLABLEcl

java - ORA-02289 : sequence does not exist when upgrade Hibernate 3 to hibernate 4

当我将hibernate从3.5升级到4.0.0.RC6时,我遇到了与找不到序列相关的问题:atorg.hibernate.internal.SessionImpl.persist(SessionImpl.java:703)[hibernate-core-4.0.0.CR6.jar:4.0.0.CR6]atorg.hibernate.internal.SessionImpl.persist(SessionImpl.java:707)[hibernate-core-4.0.0.CR6.jar:4.0.0.CR6]atorg.hibernate.ejb.AbstractEntityMana