Jump to content

Archived

This topic is now archived and is closed to further replies.

massive

Have trouble

Recommended Posts

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 4
failed 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

Share this post


Link to post
Share on other sites
[!--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 4
failed 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?

Share this post


Link to post
Share on other sites
solved

instead of this:

c:\some directories\file\tmp



it was change to this:


c:\\some directories\\file\\tmp




:)

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.