\ and / for linux or windows folder problem
Posted: Thu Sep 10, 2009 3:34 am
Hey !
I want to move files to, for example using $temp_folder as a destination,
but actually, / is for *ux and \ for windows. I would like my php code to work on any OS.
I use php on command line : in the console, but not Apache or other software.
I think it's a common problem and many topics has been posted on the web, but I haven't found any so far (wrong choice of keywords? wrong method?)
Anyway, thank in advance
I want to move files to, for example using $temp_folder as a destination,
Code: Select all
$temp_folder = sys_get_temp_dir()."/".rand()."/";I use php on command line :
Code: Select all
php myApplication.phpI think it's a common problem and many topics has been posted on the web, but I haven't found any so far (wrong choice of keywords? wrong method?)
Anyway, thank in advance