shell_exec("export NLS_LANG=AMERICAN_AMERICA.UTF8");
$xa = shell_exec("echo $NLS_LANG");
echo $xa;
This code not working, where problems ?
shell_exec("export NLS_LANG=AMERICAN_AMERICA.UTF8");
$xa = shell_exec("echo $NLS_LANG");
echo $xa;
This code not working, where problems ?
Because both are running as different processes in different environments.
php |___shell 1 |___shell 2
You can manipulate the environment with putenv
.
putenv("NLS_LANG=AMERICAN_AMERICA.UTF8");
$xa = shell_exec("echo \$NLS_LANG");
echo $xa;
Hope this helps.