|
Posted by Kim Andrι Akerψ on 10/13/06 13:04
Rik wrote:
> Hi all,
>
> is there a in PHP to get the available locales without shellacces
> (i.e. locale -a)?
>
> Grtz,
Does this do anything for you? ->
<pre><?php passthru("locale -a"); ?></pre>
The <pre></pre> is just for the sake of formatting. Whether or not the
above code line will work, depends on the system configuration (ie. the
ability to run external commands may be disabled by the administrator).
If you want to assign this to an array, try using exec() with the
output parameter passed, like this:
<?php exec("locale -a",$output); ?>
In the above example, each element in the $output array contains a
locale (ie. a line from the command output).
--
Kim AndrΓ© AkerΓΈ
- kimandre@NOSPAMbetadome.com
(remove NOSPAM to contact me directly)
[Back to original message]
|