php3-list | 2000051
Date: 05/01/00
- Next message: Dave Goodrich: "Re: [PHP3] [Q] Saving content to local machine"
- Previous message: Martin Edelius: "[PHP3] Suggestion for a revision of the FAQ"
- In reply to: TomHenry: "Re: [PHP3] PHP Code - Win v. *nix"
- Next in thread: Phil Driscoll: "Re: [PHP3] Namespace OS independance (was: Re: [PHP3] PHP Code - Win v. *nix)"
- Maybe reply: Phil Driscoll: "Re: [PHP3] Namespace OS independance (was: Re: [PHP3] PHP Code - Win v. *nix)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> At 11:05 AM 5/1/00 -0400, Mitch Vincent wrote:
> >There is alwyas going to be some amount of code change. Even on the smallest
> >scale, think about directory names. in Windows "c:\doot\foobar\mytext.txt"
> >might be a valid path however in *ix it might need to be
> >"/doot/foobar/mytext.txt"... So yes, PHP code is portable but that's not
> >saying that the exact code is going to work on either type of OS.
> >
> >
* TomHenry <tom <email protected>> [000501 09:03] wrote:
>
> I too do development on W32 and then run the websites on Unix servers.
>
> To avoid the /path/ problems/differences I find that $DOCUMENT_ROOT value
> is helpful in coding for platform independence.
As do I, although I'm interested to know if php has the equivelant
of Java's path_seperator thingy (I forget Java's exact term). The
cool part about it is that it allows you to construct paths to
files in a platform independant way:
pseudo-code because thankfully it's been a while since I've had to
ab^H^Huse Java:
foo = open("dir1" + path_seperator() + "myfile", "r");
The java interface is really ugly, but It'd be nice if php supported
\p in strings that would get expanded to the OS's path seperator
Maybe this already exists but skimming through the docs I see a
lot of mentioning about making sure to use / instead of \ on UNIX
and no mention of an easy way to do this.
-Alfred
-- PHP 3 Mailing List <http://www.php.net/> To unsubscribe, send an empty message to php3-unsubscribe <email protected> To subscribe to the digest, e-mail: php3-digest-subscribe <email protected> To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Dave Goodrich: "Re: [PHP3] [Q] Saving content to local machine"
- Previous message: Martin Edelius: "[PHP3] Suggestion for a revision of the FAQ"
- In reply to: TomHenry: "Re: [PHP3] PHP Code - Win v. *nix"
- Next in thread: Phil Driscoll: "Re: [PHP3] Namespace OS independance (was: Re: [PHP3] PHP Code - Win v. *nix)"
- Maybe reply: Phil Driscoll: "Re: [PHP3] Namespace OS independance (was: Re: [PHP3] PHP Code - Win v. *nix)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

