Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #18460 > unrolled thread

content of /usr/include/*.php files

Started byalex <1j9448a02@lnx159sneakemail.com.invalid>
First post2020-12-14 10:44 +0100
Last post2020-12-15 16:20 +0100
Articles 3 — 2 participants

Back to article view | Back to comp.lang.php


Contents

  content of /usr/include/*.php files alex <1j9448a02@lnx159sneakemail.com.invalid> - 2020-12-14 10:44 +0100
    Re: content of /usr/include/*.php files "J.O. Aho" <user@example.net> - 2020-12-14 13:37 +0100
      Re: content of /usr/include/*.php files alex <1j9448a02@lnx159sneakemail.com.invalid> - 2020-12-15 16:20 +0100

#18460 — content of /usr/include/*.php files

Fromalex <1j9448a02@lnx159sneakemail.com.invalid>
Date2020-12-14 10:44 +0100
Subjectcontent of /usr/include/*.php files
Message-ID<rr7c6j$1f3c$1@gioia.aioe.org>
/usr/include
~/include
<my-project>/include

The files contained in these directories, in turn, what should they contain?

Definitions of constants?
Definitions of global variables?
Instructions like header (...);, etc.?
Functions?
Classes?

Here is an example:

<?php // ~/include/sample.php
define(...);
$global_var = ...;
header(...);
set_include_path(...);
set_error_handler(...);
function abc() {}
class xyz {}

What should there be and what shouldn't there be?

[toc] | [next] | [standalone]


#18461

From"J.O. Aho" <user@example.net>
Date2020-12-14 13:37 +0100
Message-ID<i3p4keFmi2fU1@mid.individual.net>
In reply to#18460
On 14/12/2020 10.44, alex wrote:


 > The files contained in these directories, in turn, what should they
 > contain?
> /usr/include

c/c++ header files only for libraries that you have installed on your 
system.


> ~/include

Up to you, avoid to store headers and stuff here as you will complicate 
your project and may break it from working on other systems.


> <my-project>/include

headers files that are part of your project., for example *.h / .hpp
some php projects uses this for a location of files with functionality 
used in many parts of the project and default values as constants, 
classes that works as data containers. In many PHP projects this is 
called libs instead, as PHP do not really use headers like c/c++.


-- 

  //Aho

[toc] | [prev] | [next] | [standalone]


#18462

Fromalex <1j9448a02@lnx159sneakemail.com.invalid>
Date2020-12-15 16:20 +0100
Message-ID<rrak7k$rp2$1@gioia.aioe.org>
In reply to#18461
Il 14/12/20 13:37, J.O. Aho ha scritto:
> On 14/12/2020 10.44, alex wrote:
> 
> 
>  > The files contained in these directories, in turn, what should they
>  > contain?
>> /usr/include
> 
> c/c++ header files only for libraries that you have installed on your 
> system.
> 
> 
>> ~/include
> 
> Up to you, avoid to store headers and stuff here as you will complicate 
> your project and may break it from working on other systems.
> 
> 
>> <my-project>/include
> 
> headers files that are part of your project., for example *.h / .hpp
> some php projects uses this for a location of files with functionality 
> used in many parts of the project and default values as constants, 
> classes that works as data containers. In many PHP projects this is 
> called libs instead, as PHP do not really use headers like c/c++.
> 
> 

thanks

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.php


csiph-web