The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

about changing filename

Discussion in 'General Discussion' started by hanliong, Feb 8, 2010.

  1. hanliong

    hanliong Member

    Joined:
    Nov 27, 2007
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    I have client who uploaded images with space bar. I can run a PHP file to change the filename at database, so the space bar will be changed to -. Its very simple by using strtr.

    But the question is, how to change the real image file?
    for example, the image name stored at folder images/ is abd ef.jpg. It should be changed to abd_ef.jpg, so there's no space bar at the real image name. Not only change at database mysql.

    Thanks.
     
Loading...

Share This Page