NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
PHP SHGetFolderPath


Joined: 06 Jul 2009
Posts: 72
Reply with quote
Hi all..

I don't normally develop PHP scripts for windows, let alone specifically, but was wondering if it's possible somehow to get the value of CSIDL_APPDATA via SHGetFolderPath or some other method somehow?

I'm looking to write an integration script that I'll be happy to release here.. but this is a bit of a stumbling block for cross-os-versions (XP/ Seven, etc).

Any info greatly appreciated.



Cheers..

Ian
View user's profileFind all posts by Ian.HSend private message


Joined: 06 Jul 2009
Posts: 72
Reply with quote
Figured out a way of doing this now...

Either: $appdata = rtrim(`echo %APPDATA%`) or $_SERVER['APPDATA'].



Cheers..

Ian
View user's profileFind all posts by Ian.HSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
not even $_ENV['APPDATA'] ? I thought it's more natural to find environment variables in $_ENV

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 06 Jul 2009
Posts: 72
Reply with quote
Hi dmitri..

dmitri wrote:
not even $_ENV['APPDATA'] ? I thought it's more natural to find environment variables in $_ENV



Thanks for the suggestion (I don't do a lot of PHP shell scripting.. I normally do that in Perl).. but I checked this and I get an empty array when doing a var_dump() on $_ENV.



Cheers..

Ian
View user's profileFind all posts by Ian.HSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
seems it has something to do with settings in php.ini
http://php.net/manual/en/reserved.variables.environment.php

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 31 Mar 2015
Posts: 1
Reply with quote
I'm looking to write an integration script that I'll be happy to release here.. but this is a bit of a stumbling block for cross-os-versions (XP/ Seven, etc).




.......................
View user's profileFind all posts by ajoyna1Send private message
PHP SHGetFolderPath
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic