Jump to content

Have trouble


massive

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
Link to comment
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?
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.