Re: Specifying file paths in Windows
| From: | Luke | Date: | Wed, 21 Jan 2004 21:36:25 +0000 |
| Subject: | Re: Specifying file paths in Windows | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-175342@lists.php.net to get a copy of this message | ||
Well, the thing is, it sounds like PDFlib isnt programmed well? or perhaps
there is a limitation in something they used...
because, sure, windows uses C:\windows\system\blah\folder\ but you can do
any of the following (this is the output from the command prompt: windoze
cmd.exe
C:\>cd windows/system32
C:\WINDOWS\system32>cd\
C:\>c:/windows/system32/ftp.exe
ftp> quit
C:\>cd /windows/system32
C:\WINDOWS\system32>cd ../system/
C:\WINDOWS\system>
so there shouldnt be a problem using relative referencing and forward
slashes? as far as i can see :/
--
Luke
"Todd Cary" <todd@aristesoftware.com> wrote in message
news:20040121150856.83766.qmail@pb1.pair.com...
> I found the problem: PDFlib is expecting the file name to be in the
> proper format for the system (Linux or NT). This is my patch:
>
> $workdir = getcwd();
>
> if ($use_unix)
> $cl_absolute_image = $workdir . "/tiff/" . $cl_image;
> else
> $cl_absolute_image = $workdir . "\\tiff\\" . $cl_image;
>
>
> Do you have a suggestion on a better way to do it?
>
> Todd
>
> Luke wrote:
> > try removing the dot and /
> >
> > so
> >
> > if (is_file("filedir/test.txt")) echo "Found it!";
> > else echo "Not found";
> >
> > that should work on windows and unix platforms, i dont think windows
likes
> > the single dot, but you can use relative referencing, by just using the
> > directory name.
> >