codehaven - php snippets - coding help
Generic filters
Exact matches only
  • Create files from template – replace text

    18th March 2014

    Php - Strings

    php codehaven

    When I create a master file (client1.php), running this file will create 19 more files, and will search inside the rest and replace the string “client1” for “client2” and so on, and it saves a new file called “client2.php” all the way up to client20.php
    Great piece of quick code.
    This even create a folder with mkdir

    Was this code snippet helpful?