It looks from the link you sent that the include path have multiple
directories in it. Do you know if that means that if the include path is
"Directory A, Directory B" that the system will first look in Directory A
for all pages and only look in Directory B if the request page is not in
Directory A?
Larry Kleinman
Kleinman Associates, Inc.
212-949-6469
From: "Briggs, Trevor (TBriggs2)" <TBriggs2@xxxxxxxxxxx>
To: "Web Enabling the IBM i (AS/400 and iSeries)"
<web400@xxxxxxxxxxxx>
Cc: <web400-bounces@xxxxxxxxxxxx>
Date: 06/24/2013 09:19 AM
Subject: Re: [WEB400] simulate library list function in php
Sent by: web400-bounces@xxxxxxxxxxxx
Although, having said, that, it looks like you'd have to duplicate ALL
the include code into the test folder for this to work. Would that be a
possibility?
Trevor Briggs
Analyst/Programmer
Lincare, Inc.
(727) 431-1246
TBriggs2@xxxxxxxxxxx
-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx]
On Behalf Of Briggs, Trevor (TBriggs2)
Sent: Monday, June 24, 2013 9:17 AM
To: Web Enabling the IBM i (AS/400 and iSeries)
Cc: web400-bounces@xxxxxxxxxxxx
Subject: Re: [WEB400] simulate library list function in php
I wasn't aware of Glenn's suggestion, but it sounds like that might work
better for you:
http://php.net/manual/en/function.set-include-path.php
Trevor Briggs
Analyst/Programmer
Lincare, Inc.
(727) 431-1246
TBriggs2@xxxxxxxxxxx
-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx]
On Behalf Of Larry Kleinman
Sent: Monday, June 24, 2013 9:13 AM
To: Web Enabling the IBM i (AS/400 and iSeries)
Cc: web400-bounces@xxxxxxxxxxxx
Subject: Re: [WEB400] simulate library list function in php
I agree that this would probably work, but this would involve my
manually
inserting code into any page that calls one of the pages that I am
testing. I am looking for a more global approach (like the LIBL
concept)
in which the system checks the TEST folder first for any requested page
and only uses the PRODUCTION folder if that page does not exist in TEST
Larry Kleinman
Kleinman Associates, Inc.
212-949-6469
From: "Briggs, Trevor (TBriggs2)" <TBriggs2@xxxxxxxxxxx>
To: <web400@xxxxxxxxxxxx>
Date: 06/24/2013 09:06 AM
Subject: Re: [WEB400] simulate library list function in php
Sent by: web400-bounces@xxxxxxxxxxxx
It sounds like you need to use PHP to "build" the path in your PHP
include statements, something like this (Assuming you can pass "?Test=Y"
at the end of your URL (untested off-the-top-of-my=head code):
<?PHP
if (isset($_GET['Test'])){
include 'morecode.php';
} else (
Include 'test/morecode.php';
}
Trevor Briggs
Analyst/Programmer
Lincare, Inc.
(727) 431-1246
TBriggs2@xxxxxxxxxxx
-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx]
On Behalf Of Larry Kleinman
Sent: Monday, June 24, 2013 7:51 AM
To: web400@xxxxxxxxxxxx
Subject: [WEB400] simulate library list function in php
Hi all - I am trying to set up a test environment for my web site where
I
can make changes to certain pages, put the changed pages in a folder
called TEST and then run my regular site but whenever one of the changed
pages is referenced (whether via an include statement, or a submit, or
HREF) the page that is used is the one in TEST, not the one in the
production folder. Essentially, I want this to behave the way an AS/400
library list works - somehow put folder TEST in front of the other
folders
but only do this when running in test. I don't care whether "running in
test" means going to a different URL, whether it means connecting with a
different user profile, etc - all i want is for the site to run normally
except when I go to it in "test mode". I tried doing a AliasMatch in my
apache config file and it works for pages that are submitted, but not
for
pages referenced via an include statement in PHP. I'm guessing that
there
might be something that i can do with the PHP.ini file, but I don't know
how to do this, or how to make it only happen for "test" signons
Larry Kleinman
Kleinman Associates, Inc.
212-949-6469
As an Amazon Associate we earn from qualifying purchases.