|
Posted by duzhidian@gmail.com on 10/16/07 07:44
On Oct 16, 2:10 am, Tim Roberts <t...@probo.com> wrote:
> Jerry Stuckle <jstuck...@attglobal.net> wrote:
> >duzhid...@gmail.com wrote:
>
> >> I can organize the codes, but it does not seems as transparent as what
> >> c/c++ does as one file at root have to consider it's grandsons'
> >> functions (location), not supposed to do that in c/c++.
>
> >You're still using relative paths. Anything starting with ".", ".." or
> >a path name is relative.
>
> >Absolute paths start with / in linux/unix.
>
> >It works exactly the same in C/C++. Relative paths there are relative
> >to the executable.
>
> You missed the point. He's talking about #include files, and he is quite
> correct. In C/C++, you never ever ever use an absolute pathname in an
> #include statement. Further, the preprocessor rule is that relative paths
> in an #include statement are relative to the directory that contains the
> file being scanned.
>
> PHP's rules are different. Not better, not worse. Just different.
> --
> Tim Roberts, t...@probo.com
> Providenza & Boekelheide, Inc.
Yes, you are right. I was trying using C/C++ rules onto PHP programs
and it caused some problems. I can figure it out. Anyway, thanks
your guys.
Navigation:
[Reply to this message]
|