Advertisement
Azure

php vs ruby

Dec 27th, 2011
380
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. PHP:
  2.  
  3. <?php
  4. include_once './scripts/markdown.php';
  5. $filename = './aiko.md';
  6. $handle = fopen($filename, 'r');
  7. $contents = fread($handle, filesize($filename));
  8. fclose($handle);
  9. print Markdown($contents);
  10. ?>
  11.  
  12. Ruby:
  13.  
  14. require 'markdown'
  15. contents = open('./aiko.md', &:read)
  16. puts Markdown(contents)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement