Ben dışarıdan PHP erişilebilir olmalıdır değişkeni ayarlamak için çalışıyorum. İdeal olarak bu yerel bir değişken olmalıdır, ancak ortam değişkenleri de açığız.
Birincisi, ben putenv() denedim, ama bu hiçbir sonuç verir:
$ Php-r "putenv ('PHP_TEST = string');" ; echo $ PHP_TEST
$
When i call getenv() from the same script — it results in the right 'string' value.
Safe mode is off, but the manual says 'PHP_' prefix is vital with safe=on so I use it just in case :)
Sonra system() deneyin ya shell_exec():
$ Php-r "shell_exec ('PHP_TEST = string');" ; echo $ PHP_TEST
$ Php-r "shell_exec ('ihracat PHP_TEST = string');" ; echo $ PHP_TEST
$
Is there a workaround? what might be the reason? I'm using Ubuntu Linux 9.10 "Karmic", but FreeBSD server gives the same result.