草庐IT

install_parse_failed_no_certifica

全部标签

php - 如何转义由 PHP parse_ini_file 函数解析的文件中的特殊字符?

我想在配置文件中保留某个字符串,以便由PHP解析parse_ini_file()功能。但是,此字符串包含一些需要以某种方式编码的特殊字符(代码如0x2C或0x3D)。有什么办法可以在这样的文件中写一个十六进制代码的特殊字符吗? 最佳答案 转义INI值的正确方法是将它们包含在"doublequotes"中.如果您的字符串不包含双引号,您可以将其用作用双引号括起来的值。根据http://php.net/manual/en/function.parse-ini-file.php#100046,只要值中没有两个连续的双引号,用反斜杠转义单引

php - ? : in old version of PHP causing parse error

我一直在使用SimpleImage类进行图像处理,但它在一个特定站点上不起作用服务器上的PHP版本是5.1.6-所以六岁了解析错误:语法错误,意外的“:”在...引起错误的有问题的行$height=$height?:$width;$quality=$quality?:$this->quality;$filename=$filename?:$this->filename;有解决办法吗? 最佳答案 三元运算符简写$val1?:$val2是introducedinPHP5.3,并且与$val1相同?$val1:$val2

php - fopen : failed to open stream: Permission denied in PHP on Mac

这个问题在这里已经有了答案:PHP-Failedtoopenstream:Nosuchfileordirectory(10个答案)关闭6年前。我写了这段代码:if(file_exists("testfile.rtf"))echo"fileexists.";elseecho"filedoesn'texist.";$fh=fopen("testfile.rtf",'w')ordie("impossibletoopenthefile");$text=但是当我运行它时它说:fopen(testfile.rtf):failedtoopenstream:Permissiondeniedin/App

php - 火力基地: "Could not parse auth token."

你好,我正在使用带有php的firebase并使用这个library.我收到此错误“无法解析身份验证token。”我的授权token是正确的,因为我也使用了与node.js相同的token。我的代码是这样的require"vendor/autoload.php";constDEFAULT_URL='https://xxxxxxxxx.firebaseio.com';constDEFAULT_TOKEN='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';$firebase=new\Firebase\FirebaseLib(DEFAULT_URL,DEFAULT_TOK

PHP parse_ini_file() - 它看起来在哪里?

如果我调用php的parse_ini_file("foo.ini"),它会在什么路径中查找foo.ini?包含路径?该函数的文档没有提及它。 最佳答案 parse_ini_file的文件名参数是一个标准的php文件名,因此与使用fopen打开文件的规则相同。.您必须指定绝对文件路径(“/path/to/my.ini”)或相对于当前工作目录的路径(“my.ini”)。参见getcwd对于您当前的工作目录。与默认的fopen命令不同,如果指定了相对路径(“my.ini”),parse_ini_file将在搜索当前工作目录后搜索包含路径。

php - 是否有可靠且不易出错的 parse_str() 替代方案?

有没有可靠的替代parse_str()解析查询字符串的函数?我发现它非常困惑且容易出错,特别是当查询字符串来自外部服务(并且您无法完全控制它)时:$error="Errormessage";parse_str("param1=hello&error=false");//Overrides$errorparse_str($externalQuery);//Whichvariablesaresettedandwhichnot? 最佳答案 将可选的第二个参数传递给parse_str()它将把值放在关联数组中,而不是创建/覆盖变量。来自ph

php - 未捕获的 SoapFault 异常 : [WSDL] SOAP-ERROR: Parsing WSDL Couldn't load from 'http://88. XXX.XXX.XXX:8080/

我在从php调用网络服务时遇到问题。使用我的个人网站,没有错。但是当我从我的专用服务器尝试时:fatalerror:未捕获的SoapFault异常:[WSDL]SOAP-ERROR:解析WSDL:无法从“http://88.XXX.XXX.XXX:8080/SongBoxServeur/GestionSongBox?wsdl”加载':无法加载外部实体“http://88.XXX.XXX.XXX:8080/SongBoxServeur/GestionSongBox?wsdl”我的网站和专用服务器上的相同.php:function__construct($_ip,$_num_serie){

php - fatal error : Class 'ZMQContext' not found ( but it is installed and works on the terminal )

我想试试ZeroMQ,我写了两个php文件,service.php和client.php。我使用linux终端运行服务php/web/test/service.php,没问题,终端打印“正在等待客户端连接...”。但是,我通过chrome资源管理器请求我的client.php,发生了错误,我检查了我的error.log,有消息“phpfatalerror:class'ZMQContext'notfound.......”我使用命令php-m来检查我的php扩展,zmq已经在该列表中。 最佳答案 问题是ZMQ模块已加载到PHPCLI(

php - 无法打开流 : No such file or directory

您好我是php的新手,我正在处理图像上传和裁剪,并在Windows7上的zend中保存bth上传和裁剪图像,但它给了我这些错误。请帮助我解决这些错误。Warning:imagecreatefromjpeg(public/image/)[function.imagecreatefromjpeg]:failedtoopenstream:NosuchfileordirectoryinC:\wamp\www\ModuleEx.com\application\modules\admin\controllers\IndexController.phponline64Warning:imagecop

php - fatal error : Uncaught exception 'Parse\ParseException' with message in parse sdk

我使用以下代码获取数据库数据:require'autoload.php';$app_id='AAAAA';$rest_key='XXXXX';$master_key='RRRRR';useParse\ParseObject;useParse\ParseQuery;useParse\ParseACL;useParse\ParsePush;useParse\ParseUser;useParse\ParseInstallation;useParse\ParseException;useParse\ParseClient;useParse\ParseAnalytics;useParse\Par