[nycphp-talk] relative paths in Windope
David Krings
ramons at gmx.net
Sun Sep 24 17:13:56 EDT 2006
Hi,
although I managed to find a workaround I still wonder how one can make use
of relative paths on Windows when using commands such as mkdir, rmdir,
unlink, etc.
For example:
unlink(.\oh11je9qfrh9ns3evmee794qh3\PDRM0660.JPG)
fails with this error
No such file or directory in
E:\piviviewer\administration\pics\addpictosystem.php on line 276
but the file in the directory in which the script file is located has the
folder oh11je9qfrh9ns3evmee794qh3 and in that is the file PDRM0660.JPG.
For now I created a function that figures out what the path is to the
current location by taking the [SCRIPT_FILENAME] of $_SERVER and cutting
the filename of the current script file off at the end (I vaguely remember
that there is a better way to do this with some command that just returns
the path portion) and then combine this with the path and file to be deleted.
That is quite annoying, but using relative paths on Windope doesn't work as
it seems. Anyone has a better solution (besides dumping Windoof) than to
massage strings until it fits?
Thank you very much in advance.
David K.
More information about the talk
mailing list