草庐IT

working-directory

全部标签

PHP file_exists 但重命名失败 "No such file or directory..."?

这个问题不太可能帮助任何future的访问者;它只与一个小的地理区域、一个特定的时间点或一个非常狭窄的情况有关,这些情况并不普遍适用于互联网的全局受众。为了帮助使这个问题更广泛地适用,visitthehelpcenter.关闭9年前。考虑到有问题的文件的创建有点滞后于有问题的函数,我尝试运行一个while循环来争取一点时间,然后再调用重命名。$no_file=1;while($no_file&&$no_file在这个配置中,我认为rename()只能在file_exists()返回true时被调用,但对于我的生活我无法弄清楚如何/为什么rename()被调用然后返回失败...PHPWa

php - Zend 框架 2 : Get the path to the root directory of the application

如何获取应用程序根目录的路径。在ZendFramework1中,您可以使用常量APPLICATION_PATH,我们如何在ZendFramework2中获取它?谢谢。 最佳答案 你不应该需要。如果您使用骨架应用程序,它会在应用程序根目录中执行一个chdir();因此,将从该路径创建相对路径。如果您需要完全限定的路径,请调用getcwd()。 关于php-Zend框架2:Getthepathtotherootdirectoryoftheapplication,我们在StackOverflo

PHP :Why PHP-Curl is not working with nginx

我最近将我的网站移到了nginx服务器上。我的python代码在同一台机器上的8086端口上运行,但我的phpcurl模块不工作。我不知道我在这里做错了什么。我已经安装了php5-fpm,但仍然无法解决这个问题。我也看不到错误,因为nginx只显示空白屏幕。顺便提一句。它在curl_init()语句之前打印所有值。我也可以发布我的Nginx配置,但我认为这不是必需的。 最佳答案 你需要运行/etc/init.d/php5-fpmrestart 关于PHP:WhyPHP-Curlisnot

php - window : Add site directory to Apache config

我的计算机上有一个Apache的本地实例用于开发目的,我正在尝试将站点目录添加到Apache的httpconf文件,其中包含一些我正在尝试使用Eclipse调试的示例Web应用程序。我要添加的目录如下:C:\Eclipse_Workspace\dummyWeb添加路径后,我重新启动了Apache并尝试输入一个URL为:http://localhost/Eclipse_Workspace/dummyWeb/enterGreeting.php但我收到404错误页面。我不确定我必须做什么才能让页面正常打开。我是Apache服务器配置的新手,正在使用ApacheConfLite作为基于GUI的

php - 运行时异常 : Unable to guess the Kernel directory

我正在使用Symfony3.4。突然,每当我尝试在/tests中运行我的测试(phpunit)时,我都会收到以下错误:RuntimeException:UnabletoguesstheKerneldirectory.我的测试类看起来像:classPaymentCreditTestextendsKernelTestCase{/**@varPaymentRepository*/public$paymentRepository;/***{@inheritDoc}*/protectedfunctionsetUp(){$this->paymentRepository=self::bootKern

PHP/图形 API : Why my facebook session doesn't work's?

我是FacebookGraphAPI的新开发者。我已经按照本教程进行操作:https://www.webniraj.com/2014/05/01/facebook-api-php-sdk-updated-to-v4-0-0.我测试过一次并且有效。我已经修改并重新测试,它的工作。但是,第二天,什么都没有...我的facebooksessiontoken发生了变化,我不知道为什么以及如何发生变化。这是我的代码://ALLincludesandvariables//startsessionsession_start();//initappwithappidandsecretFacebookS

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 - Laravel5.2 调度 :run don't work with cron job

我在使用phpartisanschedule:run时遇到问题。我在GoDaddy上有以下cron作业:/usr/bin/php/home/usr/framework/artisanschedule:run>>/dev/null2>&1每次,我都会收到此错误消息:local.ERROR:exception'ErrorException'withmessage'Invalidargumentsuppliedforforeach()'in/home/usr/framework/vendor/symfony/console/Input/ArgvInput.php:286Stacktrace:

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