On Monday 23 April 2001 22:47, Jaxon wrote:
> Hmm...
>
> Is there any way to set something like include_path on the fly, so you just
> define all your possible direcories at once in what is essential a 'site
> environment' variable, and then you can include/require your files without
> putting any path info in?
>
> regards,
> jaxon

Sure you can, set the include_path in your php.ini file.


-- 
Meir Kriheli

  There's someone in my head, but it's not me - Pink Floyd

>
> > -----Original Message-----
> > From: Toby Miller [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, April 23, 2001 3:44 PM
> > To: indrek siitan
> > Cc: PHP General Mailing List
> > Subject: Re: [PHP] Site Structure
> >
> >
> > While it is true that you don't have to put your files in the web
> > directory
> > at all and it is a more secure option there is still one very large
> > inconvenience that prevents me from going with that option. You lose the
> > usefulness of just including
> > "$DOCUMENT_ROOT/yourfolder/yourfilename". This
> > is the main reason that I do put my files in the root web
> > directory. So how
> > do you tell all of your files where your included content is? Do you hard
> > code the path in every page? If so, do you also have development,
> > stage, and
> > live environments that mimic the exact same directory structures?
> > If not, do
> > you always change the include strings by hand every time you move from
> > one environment to another? Do you run into these problems? What kind of
> > solutions/workarounds have you implemented?
> >
> > I have always used this style of including documents because it enables
> > me to do my mockup ideas on my Windows machine with PWS. Then I can move
> > onto my Linux test box and try the site in my home account. Then I can
> > push the exact same code to the dev server which uses www as the root web
> > directory.
> > Then I can push the exact same code to the staging server for
> > clients to see
> > which has wwwroot as the root web directory and the live
> > environment mimics
> > the stage environment so that move makes little to no difference. Now if
> > someone else was working on the same project and checked the files out of
> > CVS they would have to tweak their copy to work in their special
> > environment
> > instead of just running and developing the files. This just seems like a
> > whole lot of extra work to me. Correct me if I'm wrong, but the only way
> > anyone can see the source code of a php file if the extension is
> > associated
> > with the PHP interpreter is if you provide a phps file that they
> > can see or
> > if someone uninstalls the PHP interpreter (which bypasses the situation
> > because the first condition is no longer being met).
> >
> > I'm really curious to see how other developers handle these kind of
> > development situations.
> >
> > ----- Original Message -----
> > From: "indrek siitan" <[EMAIL PROTECTED]>
> > To: "Toby Miller" <[EMAIL PROTECTED]>; "Jordan Elver"
> > <[EMAIL PROTECTED]>
> > Cc: "PHP General Mailing List" <[EMAIL PROTECTED]>
> > Sent: Monday, April 23, 2001 1:22 PM
> > Subject: RE: [PHP] Site Structure
> >
> > > Hi,
> > >
> > > > Also, it's not a good idea to use the .inc extension unless you've
> > > > associated it with PHP. The reason is if I type the URL directly to
> > > > /includes/header.inc I will get the source code for that file in text
> > > > format.
> > >
> > > you don't have to keep your .inc files in the web server document
> > > root folder at all...
> > >
> > >
> > > Rgds,
> > >   Tfr
> > >
> > >  --==< [EMAIL PROTECTED] >==< MySQL development team >==< Tallinn / Estonia
> > >==--

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to