This is really strange.
I have to pages in different sitegroups.
The pages are identical (code shown below)
Pages are active.
I access the pages with http://site/images/gallery/pic.jpg
On one site i get the picture
On the other site i get <html><head></head></html>
My code:
<?
$topics = mgd_get_topic(17); // topic id changes between sites
$sitegroup = $topics->getsitegroup();
$guid = $sitegroup->guid();
$subgallery = $argv[0];
$image = $argv[1];
if($gallery =
mgd_get_snippetdir_by_path("/GLOBALS/".$guid."/GALLERY/".$subgallery))
if(!$gallery->serveattachment($image))
$gallery->serveattachment("shim.gif");
exit();
?>
(Bet there are better ways to do it but im trying to learn atm :)
Has anyone seen this behavior before ?
Sites are running on
Apache-AdvancedExtranetServer/1.3.26
php-4.2.3
MySQL-3.23.52
Midgard 1.4.4
Aegir 1.0rc2
/Johan "SmallOne" Bernhardsson
On Wed, 2003-07-09 at 08:34, Eero af Heurlin wrote:
> Johan Bernhardsson wrote:
> > Hello,
> >
> > I have some question on how active pages works.
> > Im trying to build a site that uses the galler extension in aegir.
> >
> > Ive used an example that i found here on the mailinglist to create a
> > simple active pages called images to easily link pics to pages.
> >
> > To be able to extend that and write my own stuff i would like some info
> > on how active pages works compared to static. And how to use them.
> >
>
> In an active page the URL components after the page (that do not match
> any subpage of the active page) are passed as arguments to the page
> code, there are two variables:
>
> $argc which contains integer count of the arguments
> $arvg[] which contains the arguments in order, zero based key (so
> $argv[0] is the first argument and so on)
>
>
> Example:
>
> /activepage/first/second.html
>
> here $argc=2, $argv[0]="first" and $argv[1]="second" (since .html and
> trailing slashes are always stripped)
>
> This is especially usefull with dynamic content and mirroring (say
> loading an article based on ID or GUID [or name]) since you get nicer
> URLs than by passing the argument as GET parameter.
>
> /Rambo
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]