Sunday, 30 September 2012

proc_open provides a much greater degree of control over the program execution

resource proc_open ( string $cmd , array $descriptorspec , array &$pipes [, string $cwd [, array $env [, array $other_options ]]] )
proc_open() is similar to popen() but provides a much greater degree of control over the program execution.

$cmd can actually be multiple commands by separating each command with a newline. However, due to this it is not possible to split up one very long command over multiple lines, even when using "\\\n" syntax.

5.2.1 Added the bypass_shell option to the other_options parameter. 5.0.0 Added the cwd, env and other_options parameters.

How to set up PHP and Ruby On Rails in Leopard

ucwords - Uppercase the first character of each word in a string

string ucwords ( string $str )
Uppercase the first character of each word in a string
Returns a string with the first character of each word in str capitalized, if that character is alphabetic.

<?php
$foo 
'hello world!';$foo ucwords($foo);             // Hello World!
$bar 'HELLO WORLD!';$bar ucwords($bar);             // HELLO WORLD!$bar ucwords(strtolower($bar)); // Hello World!?>


14.-Curso PHP-MySQL. Formatear, cortar y unir strings.