If, as I think I understand (apologies if I don't), you want to re-use the 
bootstrap from a central location. The problem could be resolved by replacing 
the link with an include shell. Basically an index.php with an include 
statement pointing to a centralised bootstrap file (say kernel_index.php). 
Similar effect, but you now have two PHP files, on two paths, linked together.
 
Pádraic Brady
http://blog.astrumfutura.com
http://www.patternsforphp.com


----- Original Message ----
From: Xavier Vidal Piera <[EMAIL PROTECTED]>
To: Adler Medrado <[EMAIL PROTECTED]>
Cc: [EMAIL PROTECTED]
Sent: Thursday, April 12, 2007 11:36:14 AM
Subject: Re: [fw-general] Multiple applications with ZF

The lib's soft link works perfect, because there are only libraries but no 
executable files.

Otherwise, the index.php is the problematic one, because in the first lines i'm 
getting the file path with dirname(__FILE__) and i'm getting the kernel path 
instead of the application path where i'm executing the file.


2007/4/12, Adler Medrado <[EMAIL PROTECTED]>:
Try to put the kernel/lib on your include_path. 
It may works fine.

2007/4/12, Xavier Vidal Piera <
[EMAIL PROTECTED]>:
Hi

I'm developing a couple of different applications, using ZF, and now i'm 
planning the application layout for each development. One thing i'm trying to 
avoid is replicate a lot of code, specially the lib folder and the bootstrap 
file (
index.php). If I can manage to centralize as much code as possible it will be 
very good.

The lib library is outside the application layout thanks a soft link from 
linux, so the application thinks the libs is inside the application layout, but 
i want to improve all this stuff. The bootstrap file follows the same design.


Now i get to this point:

Kernel/    
    lib/
    www/
       .htaccess
       .index.php

Application1/
    etc/
    lib/ (link to kernel/lib)

    ...
    www/
       @.htaccess (link to kernel/www/.htaccess)
       @index.php (link to kernel/www/index.php)

Application2/
    ...

There's a problem, as the kernel's index.php is in kernel's path instead of 
application#'s path, so it get useless.


Anybody knows a better way to make a good layout to achieve reutilization?

Thanks

-- 
Xavier Vidal Piera
Enginyer Tècnic Informàtic de Gestió
Tècnic Especialista Informàtic d'equips

[EMAIL PROTECTED]
610.68.41.78





-- 
adler medrado

Consultor 

http://adler.neshertech.net




-- 
Xavier Vidal Piera
Enginyer Tècnic Informàtic de Gestió
Tècnic Especialista Informàtic d'equips
[EMAIL PROTECTED]

610.68.41.78






       
____________________________________________________________________________________
8:00? 8:25? 8:40? Find a flick in no time 
with the Yahoo! Search movie showtime shortcut.
http://tools.search.yahoo.com/shortcuts/#news

Reply via email to