Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6687023
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:14:22+00:00 2026-05-26T05:14:22+00:00

I am using php copy() function and am getting strange results which made me

  • 0

I am using php copy() function and am getting strange results which made me google and couldn’t find anything about this topic so my conclusion was that php’s copy($src, $dest) function cant have utf8 characters in the $src and $dest, but just wanted you guys to confirm on this – or maybe you know a way around this?

final conclusion:
@azat: I thank you for your answers and trying to help – but all in all now I see I was wrong! The files (when downloaded to my computer did have correct caracters!, but when I was viewing the contents of the folder from my WinSCP I was seeing them all scrambled which I presume is because of the WinSCP. Anyway I will mark your answer correct as you were the only one to help and made me realize my error in the end.

edit: system on which i run this is Linux and an example of the command in php file is this:

<?php
    copy ("images/test.png", "images/myTestŽĆČĐŠžćčđš.png");
?>

edit2:

#>uname -a
Linux litij.avalon.hr 2.6.18-274.3.1.el5 #1 SMP Tue Sep 6 20:13:52 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux

#>cat /etc/mtab
/dev/root /lib virtfs defaults 0 0
/dev/root /opt virtfs defaults 0 0
/dev/root /lib64 virtfs defaults 0 0
/dev/root /usr/lib virtfs defaults 0 0
/dev/root /usr/lib64 virtfs defaults 0 0
/dev/root /usr/sbin virtfs defaults 0 0
/dev/root /usr/share virtfs defaults 0 0
/dev/root /usr/bin virtfs defaults 0 0
/dev/root /usr/man virtfs defaults 0 0
/dev/root /usr/X11R6 virtfs defaults 0 0
/dev/root /usr/kerberos virtfs defaults 0 0
/dev/root /usr/libexec virtfs defaults 0 0
/dev/root /usr/local/bin virtfs defaults 0 0
/dev/root /usr/local/share virtfs defaults 0 0
/dev/root /usr/local/Zend virtfs defaults 0 0
/dev/root /usr/local/IonCube virtfs defaults 0 0
/dev/root /usr/include virtfs defaults 0 0
/dev/root /usr/local/lib virtfs defaults 0 0
/dev/root /var/spool virtfs defaults 0 0
/dev/root /var/lib virtfs defaults 0 0
/dev/root /var/cpanel virtfs defaults 0 0
/dev/root /usr/local/cpanel/Cpanel virtfs defaults 0 0
/dev/root /var/run virtfs defaults 0 0
/dev/root /var/log virtfs defaults 0 0
/dev/root /tmp virtfs defaults 0 0
/dev/root /dev virtfs defaults 0 0
/dev/root /bin virtfs defaults 0 0
/dev/root /usr/local/apache/domlogs virtfs defaults 0 0
/dev/root /etc/mail virtfs defaults 0 0
/dev/root /home/fotoctim virtfs defaults 0 0
none /proc proc rw 0 0

Worth noting is that my copy command doesn’t give any errors 🙁

if (copy($src, $dest)){
    echo  "File <b>successfully</b> copied to $dest<br/>";
}
else{
    echo "File <b>was not!</b> copied to $dest<br/>";
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T05:14:23+00:00Added an answer on May 26, 2026 at 5:14 am

    Ext4
    LANG=en_US.UTF-8

    <?
    touch("/tmp/test.png");
    copy("/tmp/test.png", "/tmp/myTestŽĆČĐŠžćčđš.png");
    
    azat:~$ ls /tmp/myTestŽĆČĐŠžćčđš.png 
    /tmp/myTestŽĆČĐŠžćčđš.png
    

    So the question is what filesystem you have and mount options

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm getting error while using php function copy() Warning: copy() [function.copy]: Couldn't resolve host
I'm using PHP to copy JPGs from a remote server to my own server.
Using PHP, what's the fastest way to convert a string like this: 123 to
Using PHP ... This is for my personal use so I'm thinking maybe 3-4
I'm having issues sending emails using the php mail() function. I know the php
I am using the following code in WINDOWS OS and PHP script, in which
This is the javascript code im using. <script language=javascript type=text/javascript> function cancelevent() { input_box=confirm(Are
I'm using the PHP function imagettftext() to convert text into a GIF image. The
I'm having difficulty with a php script using copy() on a shared remote host.
I am using this copy directory helper addon for the directory helper to help

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.