Voting

: five plus one?
(Example: nine)

The Note You're Voting On

drewish at katherinehouse dot com
17 years ago
When you're writing one line php scripts remember that 'php://stdin' is your friend. Here's a simple program I use to format PHP code for inclusion on my blog:

UNIX:
  cat test.php | php -r "print htmlentities(file_get_contents('php://stdin'));"

DOS/Windows:
  type test.php | php -r "print htmlentities(file_get_contents('php://stdin'));"

<< Back to user notes page

To Top