massive Posted May 13, 2006 Share Posted May 13, 2006 hi guys i've seem to have some trouble transfering some of my files here is the code but i know this really works but in my case does'nt... :( heres the simple code that i can't run:[b]If i do this:[/b][code]<? $getting_this_file ="C:\mysql\bin\dbases.txt"; $putting_to_this_directory ="C:\dbases.txt"; if (!copy($getting_this_file , $putting_to_this_directory)) { print ("failed to copy into directory $getting_this_file...<br>\n");}?>[/code][b]This is the error msg that comes out [/b]Warning: copy(C:\mysql\bin\dbases.txt) [function.copy]: failed to open stream: No such file or directory in C:\some directory\htdocs\phpscript\copy.php on line 4failed to copy into directory C:\dbases.txt...Then i Added an "@" sign before copy ======> '!@copy':[code]<? $getting_this_file ="C:\mysql\bin\dbases.txt"; $putting_to_this_directory ="C:\dbases.txt"; if (!@copy($getting_this_file , $putting_to_this_directory)) { print ("failed to copy into directory $getting_this_file...<br>\n");}?>[/code][b]Then This is the error msg comes out which i did when failed of copying a certain file [/b]failed to copy into directory C:\dbases.txt...i'm using php version 5.0.5 and apache 2 under windows environment...im puzzled right now (X_x)thanks Quote Link to comment Share on other sites More sharing options...
massive Posted May 14, 2006 Author Share Posted May 14, 2006 ... Quote Link to comment Share on other sites More sharing options...
_will Posted May 14, 2006 Share Posted May 14, 2006 [!--quoteo(post=373477:date=May 13 2006, 05:38 AM:name=atitudeskills)--][div class=\'quotetop\']QUOTE(atitudeskills @ May 13 2006, 05:38 AM) [snapback]373477[/snapback][/div][div class=\'quotemain\'][!--quotec--]hi guys i've seem to have some trouble transfering some of my files here is the code but i know this really works but in my case does'nt... :( heres the simple code that i can't run:[b]If i do this:[/b][code]<? $getting_this_file ="C:\mysql\bin\dbases.txt"; $putting_to_this_directory ="C:\dbases.txt"; if (!copy($getting_this_file , $putting_to_this_directory)) { print ("failed to copy into directory $getting_this_file...<br>\n");}?>[/code][b]This is the error msg that comes out [/b]Warning: copy(C:\mysql\bin\dbases.txt) [function.copy]: failed to open stream: No such file or directory in C:\some directory\htdocs\phpscript\copy.php on line 4failed to copy into directory C:\dbases.txt...Then i Added an "@" sign before copy ======> '!@copy':[code]<? $getting_this_file ="C:\mysql\bin\dbases.txt"; $putting_to_this_directory ="C:\dbases.txt"; if (!@copy($getting_this_file , $putting_to_this_directory)) { print ("failed to copy into directory $getting_this_file...<br>\n");}?>[/code][b]Then This is the error msg comes out which i did when failed of copying a certain file [/b]failed to copy into directory C:\dbases.txt...i'm using php version 5.0.5 and apache 2 under windows environment...im puzzled right now (X_x)thanks[/quote]how are the permissions setup on your server? Quote Link to comment Share on other sites More sharing options...
massive Posted May 15, 2006 Author Share Posted May 15, 2006 solvedinstead of this:c:\some directories\file\tmpit was change to this:c:\\some directories\\file\\tmp:) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.