PHP copy() works on localhost(wamp) but not on my real web domain


ok so i'm trying to copy file.xml into another location something like copy('file.xml',../../folder/newfile.xml) ; it works just fine on my wamp virtual server but on my real site it doesn't. i thought that is something related to chmod and i changed the file.xml to 0777(with a ftp client).

is there something that i should put in my code to make it right? or what?


Copy is a pretty straigtforward function. As Mark said, it's perhaps <a href="http://www.php.net/manual/en/function.copy.php#93245" rel="nofollow">a host issue</a>.


It might be that you don't have permissions to the folder you are trying to copy to or as mentioned your host doesn't give PHP necessary permissions for copy.


  • Is there a way to remove '/web' from url in Symfony application without moving content of
  • shell_exec('which git') returns empty string on Godaddy shared hosting server
  • how can i reference $_SERVER['DOCUMENT_ROOT'] in a .htaccess file?
  • file_get_contents with https requests via proxy
  • How to configure PhpUnit in Xampp?
  • PDF in PHP ZipArchive throwing errors, server permissions
  • Is it one-to-one or Component ? Nhibernate Mapping
  • “cpanm PHP” fails
  • Installing PAR::Packer on Windows, dmake error 255
  • Specifying virtual keyboard type for EditText in XML
  • How can I tell a form not to dispose a particular control when it closes?
  • Hash Code in SQL Server?
  • During installation of Django, why do I keep getting ImportError: No module named django?
  • pillow imaging ImportError
  • Why cepheus don't send int without quotes to orion?
  • Intel-64 and ia32 atomic operations acquire-release semantics and GCC 5+
  • Zoom in and out of jPanel
  • Read text file that is not in the main package in a runnable jar
  • Breaking out column by groups in Pandas
  • How solve “Qt: Untested Windows version 10.0 detected!”
  • Firefox Extension - Monitor refresh and change of tab
  • How can I enlarge video fullscreen without the affected interface project in as3?
  • Saving Changes After In-App Purchase Has Been Purchased
  • Time complexity of a program which involves multiple variables
  • PHP buffered output depending on server setting?
  • Play WS (2.2.1): post/put large request
  • All Classes Conforming to Protocol Inherit Default Implementation
  • Is my CUDA kernel really runs on device or is being mistekenly executed by host in emulation?
  • javaw.exe and eclipse startup problems
  • Resize panoramic image to fixed size
  • Volusion's generic SQL folder, functionality
  • Deserializing XML into class C#
  • Websockets service method fails during R startup
  • To display the title for the current loaction in map in iphone
  • Is there a mandatory requirement to switch app.yaml?
  • How do you join a server to an Active Directory (domain)?
  • coudnt use logback because of log4j
  • how does django model after text[] in postgresql [duplicate]
  • Cant find why the layout is getting smaller
  • How to Embed XSL into XML