jjzjj

renaming

全部标签

php - 我如何检测 php rename() 是否已成功执行?

php文档说,如果成功,以下将返回true,如果失败,则返回false。rename('test/test1/','test/test2/test1/');如何判断真假?如果我运行确切的函数并且它成功了,文件夹就会按预期移动并且没有输出。如果失败,它只会打印一条错误消息。如何测试true或false,以便在没有错误消息的情况下判断重命名函数是否成功?这是正确的方法吗?error_reporting(0);if(rename('test/test1/','test/test1/test2/test1/')===true){print'true';}else{print'false';}

php - Laravel 6 artisan 包 :discover rename bootstrap/cache/packages

在composerupdate之后我得到一个错误:InFilesystem.phpline146:rename(/var/www/bootstrap/cache/packages.phpE7r5E4,/var/www/bootstrap/cache/packages.php):NosuchfileordirectoryArtisan命令不再有效。已经尝试过:composerducomposerinstallcomposerupdate 最佳答案 我发现了问题,我的windowsdocker(版本2.1.0.3)有时无法执行。我不知道

php - Luracast ReSTLer 3 RC6 : How to rename XML objects names

我有一个代码,例如:array('file'=>array(array('filename'=>'test1.jpg','modified'=>'2015-01-0100:00:00',),array('filename'=>'test2.jpg','modified'=>'2015-01-0200:00:00',),array('filename'=>'test3.jpg','modified'=>'2015-01-0300:00:00',),),));}}JSON输出为:{"files":{"file":[{"filename":"test1.jpg","modified":"20

PHP runkit_function_rename 不起作用?

此代码无效。为什么不呢?我真正想要的是这个。我正在使用具有功能的系统。当我在localhost上时,我希望该函数做一些不同的事情。我想用自己的东西覆盖函数。也欢迎所有替代方案。 最佳答案 您是否安装了PECL扩展?http://www.php.net/manual/en/runkit.installation.phpThis»PECLextensionisnotbundledwithPHP. 关于PHPrunkit_function_rename不起作用?,我们在StackOverflo

php - 在 PHP 中使用 rename_function() (不工作)

也许我不理解rename_function();功能或正确使用。这是我对这个函数的第一次实验:如你所见here它不起作用当我在MAMP中使用它时Chrome给我这个错误:Servererror.Thewebsiteencounteredanerrorwhileretrievinghttp://localhost:8888/translate.php.Itmaybedownformaintenanceorconfiguredincorrectly.知道为什么会这样吗?提前致谢!顺便说一句:抱歉,如果这是一个绝对基本的问题,但我无法弄清楚! 最佳答案

java - : "jarsigner: attempt to rename {file} to {file}.org failed" when signing jars with ant?失败是什么原因

我收到错误:[signjar]jarsigner:attempttorenameC:\workspace\line_editor\lib\icon.jartoC:\workspace\line_editor\lib\icon.jar.origfailed尝试在Eclipse中使用ant对一组jar进行自签名时。antbuild在这个项目中运行良好,在其他项目中也有类似的代码。我对代码做了一些小改动并尝试重建并不断收到此错误。这是相关的Ant目标:我删除了该项目并再次从我们的存储库中将其拉下。因此它与其他项目具有相同的默认项目设置,这部分不会失败。我查看了有问题的.jar,它不是只读的。

java - Jersey WADL : How do you rename generated XSDs

我正在处理的Web服务具有Jersey创建的生成的WADL。我想要做的是将xsd0.xsd重命名为Result.xsd或类似名称。当它每次重新生成WADL时,它将是Result.xsd。这对Jersey来说可能吗? 最佳答案 Thesourcecode在一个非常私有(private)的方法中硬编码了counter++东西,所以你不能轻易改变它。但正如我所见,您可以创建自己的wadl生成器实现并使用它配置org.glassfish.jersey.server.ServerProperties#WADL_GENERATOR_CONFIG

java - 处理重构时捕获到异常 'Rename package'

Eclipse中针对包名称的重构功能过去一直对我有用,直到……今天:这是我第一次收到这个奇怪的重构错误,我不知道该怎么办:Anexceptionhasbeencaughtwhileprocessingtherefactoring'RenamePackage'.Reason:Problemsencounteredwhilemovingresources.Click'Undo'toundoallsuccessfullyexecutedchangesofthecurrentrefactoring.Click'Abort'toabortthecurrentrefactoring.什么可以解释这

java - file.rename 可以替换现有文件吗?

//File(ordirectory)tobemovedFilefile=newFile("filename");//DestinationdirectoryFiledir=newFile("directoryname");//Movefiletonewdirectorybooleansuccess=file.renameTo(newFile(dir,file.getName()));if(!success){//Filewasnotsuccessfullymoved//canitbebecausefilewithfilenamealreadyexistsindestination?}

c++ - "Rename"派生类中的成员变量

这个问题可能看起来有点奇怪,但我会尝试对用例进行一些争论。假设您有一个二维(笛卡尔)场的通用实现,其维度为dim1和dim2,坐标为c1和c2。structField2D{structsize_type{size_tdim1,dim2;};structcoordinates{size_tc1,c2;}Field2D(size_typeconst&siz):size_(siz),data(size_.dim1*size_.dim2){}doubleget(coordinatesconst&coords){returndata_[coords.c1*size_.dim2+coords.c2