Hash: SHA1
Steve Uplift wrote:
> Hi,
>
> I am developing a website, which also has an admin site. Both of these are
> effectively different sites, or at least in terms of Zend MVC, seperate
> public directories. I need both sites to use the same model (as the
> databases are the same, I would be duplicating a lot of the code if I coded
> them seperately), and the same config file.
>
> What's the easiest way to do this? I know it's easy to create modules to use
> seperate controllers, views and models but they use a common public
> directory. I thought of just putting the model and config folders outside of
> both but this just feels a bit messy.
>
> Any ideas anyone?
Is there any reason you can't make the public folder (if that's the only
thing that needs to be different) a subdirectory of the "/public"
directory eg.
/public
/admin
/main
Then just point your webroot at the public/admin and public/main
directory respectively?
I think the only change it would require would be the adjusting of the
calculation of the APPLICATION_PATH in the index.php(s).
- --
Brenton Alker
PHP Developer - Brisbane, Australia
http://blog.tekerson.com/
http://twitter.com/tekerson
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkrmKUYACgkQ7bkAtAithuuX1wCfR02Nm6EW4ZZQsf02aIWf7oN8
s/MAmgNvwsMuS5sGcpEzBfwxNPDS6RtN
=Tdqz
-----END PGP SIGNATURE-----
没有评论:
发表评论