Hi,

I am totally new to cakephp and I am tearing my hair out! I finally
figured out that I could put non-cake files in the webroot folder - so
far so good. Then I decided to start breaking up my files into smaller
templates - that's when things started to go wrong.

because I have several sites under development on my machine, my doc
root as far as apache is concerned is c:/www, and I have virtual sites
with roots at:
c:/www/site1
c:/www/site2 etc.

So say I am working on site 1. My webroot as far as cake is concerned
is:
c:/www/site1/webroot.

1) I then went into my httpd conf and made sure there was a <directory>
entry for c:/www/site1 with allowoverride set to ALL and restarted
apache.

2) moved my files into c:/www/site1/webroot, and everything worked.

3) decided I should start using sub-templates for common sections of my
webpages. pulled out headers and footers and stuck them in a folder I
created at c:/www/site1/webroot/common. started using include() calls
to reinclude them into the pages:

<?php
$myroot = $_SERVER['DOCUMENT_ROOT'] . "/webroot";
include($myroot . "/common/header.php");
?>

<!-- rest of page here -->

<? include ($myroot . "/common/footer.php"); ?>

Doesn't work! I get warnings like:

Warning: main() [function.include]: Failed opening
'C:/www/mysite/webroot/common/header.php' for inclusion
(include_path='.;C:\php5\pear') in
C:\www\mysite\app\webroot\foo\bar.php on line 3

can anyone pls help explain this behaviour?!

many thx in advance..


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply via email to