Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

about changing filename

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

  1. hanliong

    hanliong Member

    Nov 27, 2007
    Likes Received:
    Trophy Points:

    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.


Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice