ini2yaml in PHP

If you still use INI file for some of your PHP-projects configuration,I guess it is time for you to migrade to YAML which is more flexible and has way more expressiveness. Here is a little tool to help you in migration process

<?php  require "Spyc.php"; if ($argc != 3)  die("I need 2 parameters:in_file.ini,out_file.yml\n"); if (!is_readable($argv[1]))  die("can't read from ".$argv[1]."\n"); $ini = parse_ini_file($argv[1],true); file_put_contents($argv[2],Spyc::YAMLDump($ini));
Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • DZone
  • FriendFeed
  • Reddit
  • Tumblr
  • Twitter
Liked this post? Follow me on twitter:@jimi_dini.

A sample text widget

Etiam pulvinar consectetur dolor sed malesuada. Ut convallis euismod dolor nec pretium. Nunc ut tristique massa.

Nam sodales mi vitae dolor ullamcorper et vulputate enim accumsan. Morbi orci magna,tincidunt vitae molestie nec,molestie at mi. Nulla nulla lorem,suscipit in posuere in,interdum non magna.