You are here: Re: The principle of include files in PHP, not as in C++ « PHP Programming Language « IT news, forums, messages
Re: The principle of include files in PHP, not as in C++

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация