SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    Get my greedy down dotJoon's Avatar
    Join Date
    Apr 2003
    Location
    daejeon, South Korea
    Posts
    2,223
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Changing directoryName

    I have a file named "change_directoryName.php".
    There is a directory named "old_directoryName" in the directory.

    I like to put some code into the file "change_directoryName.php" for changing the directory name from "old_directoryName" to "new_directoryName".

    The would-be code below doesn't work correctly, but I hope it shows what I want to try,
    Code:
    would-be code
    
    change_directoryName("old_directoryName", "new_directoryName");

  2. #2
    Hosting Team Leader silver trophybronze trophy
    cpradio's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    5,223
    Mentioned
    153 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    rename('old_directoryname/''new_directoryname/'); 
    It may benefit you to search php.net before posting
    http://php.net/manual/en/function.rename.php

  3. #3
    Community Advisor bronze trophy
    fretburner's Avatar
    Join Date
    Apr 2013
    Location
    Brazil
    Posts
    1,441
    Mentioned
    45 Post(s)
    Tagged
    13 Thread(s)
    The PHP documentation has a full list of all the filesystem functions.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •