You are here: Re: Get locales without shell access? « PHP Programming Language « IT news, forums, messages
Re: Get locales without shell access?

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)

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация