草庐IT

output-directory

全部标签

php - 正则表达式(php 中的 preg_match): last groups in the output array don't work correctly

使用这种模式:(howis\s)?(the\s)?(weather)\s?((on)\s)?(today|tomorrow|sunday|monday|tuesday|wednesday|thursday|friday|saturday|sunday|thisweek)?(\s(in)\s(.*)\s?(on)?\s?(today|tomorrow|sunday|monday|tuesday|wednesday|thursday|friday|saturday|sunday|thisweek)?)?这就是我要捕捉的东西输入:维也纳星期二的天气怎么样输出:array(100=>howis

php - 文件存在于/tmp,但 PHP 在 CentOS 上返回 "No such file or directory"

在PHP中,我收到此消息:警告:fopen(/tmp/mydir/file.txt):无法打开流:没有此类文件或目录调用fopen时('/tmp/mydir/file.txt',"r");但是:cd/tmpls-l.drwxrwxr-x2user4.0KAug1914:09mydirls-lmydir-rw-rw-r--1user41KAug1914:09file.txt如果我尝试执行print_r(scandir('/tmp/'));我得到一个空数组。执行print_r(scandir('/tmp/mydir/'));我得到无法打开目录:没有这样的文件或目录。然而,执行print_r

php - (Docker) 收到错误 : docker-php-source: no such file or directory when building docker file

当我尝试构建docker文件时:https://github.com/docker-library/php/blob/3f43309a0d5a427f54dc885e0812068ee767c03e/7.1/Dockerfile命令:dockerbuild-tphp_image.我遇到了以下错误:Step14:COPYdocker-php-source/usr/local/bin/lstatdocker-php-source:nosuchfileordirectory谁能帮我找出问题所在?谢谢 最佳答案 您没有正确的dockerbu

php - Facebook 图形 API : Parsing the output

我正在尝试通过此调用使用FBGraphAPI获取friend的姓名:$friends=file_get_contents('https://graph.facebook.com/me/friendsaccess_token='.$session["access_token"]);echo"Friends:$friends\n";这给了我一个表单列表:{"data":[{"name":"ABCXYZ","id":"12212839"},{"name":"PQRGHI","id":"5004678"}]}我希望能够仅将NAMES存储在数组中。我如何使用$friends来获取名字?$frie

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

我正在编写一些php脚本来更新我网站上的代码。为了做到这一点,我编写了以下行来检查更新版本,并从我用来分发更新的地方获取名称,然后创建该名称的链接。我做过这样的事情。$filename="http://www.hf-live.com/codeupdate/Get_Files_Name.php";$contents=file_get_contents($filename);echo$contents;我收到这个错误failedtoopenstream:Nosuchfileordirectory.即使文件存在,我仍然遇到同样的错误。我已将allow_url_fopen开启为on。上面的代码

php - 使用 sudo : Registry directory is still not writeable by the current user. 为什么?

我正在尝试运行:sudopeclchannel-updatepecl.php.net因为每次我尝试安装一个包时,它都会提示我运行它。但是,当我运行这些命令时,我得到:“当前用户无法写入注册表目录”现在thisquestion非常相似,但建议使用sudo我已经在做。当我运行sudowhoami时,我得到了root。这可能与http://pear.php.net有关吗?下降? 最佳答案 我遇到了完全相同的问题(在我的MacBook上),我是这样解决的:我使用以下步骤重新安装了PEAR:http://jason.pureconcepts.

PHP header (位置 :) redirect with root directory

有没有办法创建从根目录开始的header('Location:');路径。例如:formaction="/cert/forms/sessions/session-inc-info.php"或include($_SERVER['DOCUMENT_ROOT'].'/cert/forms/sessions/session-inc-info.php');cert是我的根目录文件夹我一直在尝试这样的代码header('Location:'.$_SERVER['DOCUMENT_ROOT'].'/cert/forms/sessions/session-inc-info.php);和header('

php - file_put_contents(.../bootstrap/cache/services.json) : failed to open stream: No such file or directory

我在运行任何phpartisan命令时一直收到此错误。[ErrorException]file_put_contents(/Applications/MAMP/htdocs/code/bheng/md-bheng/bootstrap/cache/services.json):failedtoopenstream:Nosuchfileordirectory我该如何阻止它? 最佳答案 编辑-如果services.json文件不存在,运行phpartisanserve然后停止强制创建文件。请参阅:laravelservices.jsonn

php - PHP5 服务器的带宽提速技巧 : Output and Zlib Compression

在设置PHP带宽节省和体验到的有效速度增益时,我有一些关于htaccess中设置的性质的详细、专业的问题:请允许我提前感谢您对此事的回答和澄清,因为我不理解百科全书式的长页apache手册下面的例子是在我的Apache2.0和PHP5.2.3上实际运行的#preservebandwidthforPHPenabledserversphp_valuezlib.output_compression16386.Q1:ifmodulemod_php4.c是否表明它适用于PHP4而不是PHP5?Q2:服务器引擎在php.ini而不是htaccess中有这个会更快吗?Q3:压缩默认设置为16386。

php - 使用 Ruby 的 md5 复制 PHP 5 中的 md5 raw_output 标志(原始字节)

由于荒谬的SOAP身份验证方案,我需要使用一些其他参数对APIkey进行md5哈希处理。不幸的是,提供的唯一示例代码是用PHP编写的,出于我觉得深不可测的原因,它要求md5哈希使用PHP中的可选raw_output标志(http://php.net/manual/en/function.md5.php),这导致它返回二进制(然后我必须对其进行base64编码).我的应用程序是用Ruby编写的,如果没有必要,我不想将这部分推迟到PHP文件中。但是,我似乎无法找到如何让Ruby以二进制形式返回散列。当我在PHP中正常散列它时,输出与我的Ruby输出匹配,但这不是他们要求的。PHP:ruby