草庐IT

fail-fast

全部标签

php - 拉维尔 5.6 : Table creation failed

我是Laravel的新手,我正在尝试使用Schema外观创建表。我使用命令创建迁移文件phpartisanmake:migrationcreate_products_define_standards_table--create=products_define_standards这是文件:increments('id');$table->string('code')->unique();$table->string('image');$table->timestamps();});}/***Reversethemigrations.**@returnvoid*/publicfunctio

php - preg_match 错误 : Compilation failed: missing terminating ] for character class

我在for循环中读取了一系列.txt文件。我在一些文本文件中放置了一个token,格式为[widget_]因此,例如,文本文件的全部内容可能是[widget_search]。另一个文本文件可能包含内容[widget_recent-posts]。其他人可能只有html格式的文本,根本没有token。在for循环中,我正在执行preg_match以查看文本文件的内容是否与我的标记模式匹配。如果匹配,我将执行一些条件代码。但是,当我运行跟踪测试以查看是否存在匹配时出现错误。错误是:警告:preg_match()[function.preg-match]:编译失败:在C:\xampplite\

php - preg_match "Compilation failed: missing )"

这可能是一个愚蠢的错误,但我有一个正则表达式应该匹配什么阿拉拉afkdsf[]afadf43fds["guyish"]但不是以数字开头的字符串这是代码preg_match('~^[A-Za-z][A-Za-z0-9]*(\[(?P"(?:.*(?:(?\\\\)*\").*|.*)+(?:(?\\\\)*"))\]|\[\]|)$~',trim($item[0],"\r"),$matches)但是当我执行它时,我得到错误Compilationfailed:missing)atoffset95当我执行它时here它工作正常吗?代码有什么问题?更新可读的正则表达式:~^[A-Za-z][A

php - Gmail fsockopen() : SSL operation failed error with Codeigniter and XAMPP

Errormessage1:Message:fsockopen():SSLoperationfailedwithcode1.OpenSSLErrormessages:error:14090086:SSLroutines:ssl3_get_server_certificate:certificateverifyfailedFilename:libraries/Email.phpLineNumber:1962Errormessage2:Message:fsockopen():FailedtoenablecryptoErrormessage3:Message:fsockopen():unab

PHP fatal error : require_once(): Failed opening required 'Zend/Gdata/Extension.php'

由于某些奇怪的原因,我现在无法弄清楚,NoEmbed.php在尝试包含文件时失败并出现fatalerror。包含路径设置正确,我已经验证如下(就在NoEmbed.php中的require_once指令之前):$s=ini_get('include_path');$a=explode(':',$s);foreach($aAS$path){echo$path;if(file_exists($path.'/Zend/Gdata/Extension.php'))echo'...found';elseecho'...notfound';}在预期位置输出“found”。我必须承认,我目前无法想出发

php - 谷歌通讯录 API : RetrivePhoto query failed - invalid contact ID

我正在尝试根据thisdocument使用GoogleContactsAPI检索联系人的照片.使用的PHP客户端库是here.成功获取代码和用户信息,但获取用户照片数据失败。我得到的回复是:Photoqueryfailed-invalidcontactID.这是我用来获取用户照片数据的回调函数的PHP代码:$client=newGoogle_Client();$client->setClientId(GOOGLE_APP_CLIENT_ID);$client->setClientSecret(GOOGLE_APP_CLIENT_SECRET);$client->setRedirectU

php - PHP 中 exec 命令的 FAST CGI 错误

我在php中遇到了exec命令的问题。我正在尝试通过php中的exec命令运行一个包(ffmpeg.exe),但是我的php脚本在交替运行时成功运行,即第一次运行正常,第二次运行给出内部服务器错误500,然后第三次运行成功但第四次运行给出我同样的错误。我对此感到疯狂,但无法确定它是fastCGI错误还是php错误。我的环境详细信息是:操作系统-Windows7家庭高级版,服务包1;IIS版本7.5.7600;PHP版本5.3.28我的php脚本非常简单:-echo"hello";echo'';$cmd_to_execute='ffmpeg.exe-fconcat-ilist.txt-c

php - require(public_html/mywebsite/wp-includes/post.php) 第 142 行的 :failed to open stream: permission denied in public_html/mywebsite/wp-settings. php

我在wordpress中开发了一个网站。但现在我面临一个错误:require(public_html/mywebsite/wp-includes/post.php):failedtoopenstream:permissiondeniedinpublic_html/mywebsite/wp-settings.phponline142==================================================================Fatalerror:require():Failedopeningrequired'/public_html/mywebsit

php - Imagecreatefromwebp() : WebP decode: fail to decode input data

我正在尝试使用imagecreatefromwebp()将webp文件转换为JPEG,但不幸的是,它向我发出警告:警告:imagecreatefromwebp():WebP解码:无法解码输入数据。这是我的代码$filename=dirname(__FILE__)."\\".$keyword."1.webp";//$keyword='xyz';$im=imagecreatefromwebp($filename);//Convertittoajpegfilewith100%qualityimagejpeg($im,'./example.jpeg',100);imagedestroy($im

PHP gnupg 'import failed'

我一直在尝试在PHP中使用gnupg来加密将上传到ftp文件夹的文件。我目前在使用MAMP的Mac上运行,我相信gnupg已正确安装。我有一个来自文件接收者的公钥,当我尝试以字符串文字或文本文件的形式导入key时,我从gnupg收到了神秘的“导入失败”消息。$gpg=newgnupg();$gpg->seterrormode(gnupg::ERROR_EXCEPTION);$gpg->import($key);//throwsexception'importfailed'对于key导入失败的原因,是否有更好的资源?使用GPGSuite,我可以成功导入key,所以我相信key是正确的