Re: Question about open()

2008-02-11 Thread Perrin Harkins
On Feb 10, 2008 12:37 PM, Mag Gam <[EMAIL PROTECTED]> wrote: > I am trying to change DocumentRoot because, currently I am using open() to > load templates for my website. I have header, menu, footer in 3 seperate > files, and I generate content like that. It works fine now, just not too > dynamic

Re: Question about open()

2008-02-10 Thread Foo JH
I do keep my templates in other directories also. 1. If your directories are relative to the document root, and you can take advantage of this fact by rendering a variable to remember the template path. 2. If your template directories have nothing in common with the document root, then you can

Re: Question about open()

2008-02-10 Thread Mag Gam
Thanks for the quick response Perrin. I am trying to change DocumentRoot because, currently I am using open() to load templates for my website. I have header, menu, footer in 3 seperate files, and I generate content like that. It works fine now, just not too dynamic when I want to move the stuff

Re: Question about open()

2008-02-10 Thread Perrin Harkins
On Feb 10, 2008 12:24 PM, Mag Gam <[EMAIL PROTECTED]> wrote: > my $docroot = $r->document_root('/var/www/html/perl'); Why are you trying to change the DocumentRoot? - Perrin

Re: Question about open()

2008-02-10 Thread Mag Gam
I am taking the Apache2::Request method, and will integrate the DB solution as Chandra mentioned. #!/usr/bin/perl -w use strict; use CGI; use Apache2::Request; use Data::Dumper; print "Content-type: text/html\n\n"; my Apache2::Request $r = shift; my $docroot = $r->document_root('/var/www/html/p

Re: Question about open()

2008-02-07 Thread Chandrakumar Muthaiah
Perrin Harkins wrote: On Feb 6, 2008 10:06 PM, Mag Gam <[EMAIL PROTECTED]> wrote: Currently, when I open a file I have to use the absolute path (/var/www/appname/top.inc). Is it possible for me to use just 'top.inc'? You can either use DocumentRoot (http://perl.apache.org/docs/2.0/ap

Re: Question about open()

2008-02-07 Thread Perrin Harkins
On Feb 6, 2008 10:06 PM, Mag Gam <[EMAIL PROTECTED]> wrote: > Currently, when I open a file I have to use the > absolute path (/var/www/appname/top.inc). Is it possible for me to use just > 'top.inc'? You can either use DocumentRoot (http://perl.apache.org/docs/2.0/api/Apache2/RequestUtil.html#C_

Re: Question about open()

2008-02-07 Thread brett lee
Another option: my $HEADER= "$ENV{DOCUMENT_ROOT}/header.shtml"; - Original Message From: Roberto C. Sánchez <[EMAIL PROTECTED]> To: modperl@perl.apache.org Sent: Wednesday, February 6, 2008 8:10:08 PM Subject: Re: Question about open() On Wed, Feb 06, 2008

Re: Question about open()

2008-02-06 Thread Roberto C . Sánchez
On Wed, Feb 06, 2008 at 10:47:08PM -0500, Mag Gam wrote: > What is global.asa? > > Sorry, I am somewhat new at this... > My mistake. I am using Apache::ASP (which is built on mod_perl) for my pages. Sorry for the confusion. Regards, -Roberto -- Roberto C. Sánchez http://people.connexer.com/

Re: Question about open()

2008-02-06 Thread Mag Gam
What is global.asa? Sorry, I am somewhat new at this... On Feb 6, 2008 10:10 PM, Roberto C. Sánchez <[EMAIL PROTECTED]> wrote: > On Wed, Feb 06, 2008 at 10:06:05PM -0500, Mag Gam wrote: > > Hi All, > > > > I have been using mod_perl, and I have several perl-cgi files that use > the > > open().

Re: Question about open()

2008-02-06 Thread Roberto C . Sánchez
On Wed, Feb 06, 2008 at 10:06:05PM -0500, Mag Gam wrote: > Hi All, > > I have been using mod_perl, and I have several perl-cgi files that use the > open(). I use this function to open/include my header, footer, basically a > poor man template system. Currently, when I open a file I have to use the

Question about open()

2008-02-06 Thread Mag Gam
Hi All, I have been using mod_perl, and I have several perl-cgi files that use the open(). I use this function to open/include my header, footer, basically a poor man template system. Currently, when I open a file I have to use the absolute path (/var/www/appname/top.inc). Is it possible for me t