1

I have a structure like this:

---index.php (Slim index file)
---view
   ------css
   ------js
   ------img
   ------header.php
   ------footer.php
   ------index.php 
   ------student
         -----index.php
         -----enrolment.php
   -----course
        ------index.php
        ------exam.php

The header.php and footer.php are used by all the view files inside the student and course folders. I can include them fine in my local machine just by using: include "/view/header.php"; and include "/view/footer.php";

But it doesnt seem to work when deployed on PHPFog cloud. This is the error that comes up:

Code: 2
Message: include(/view/header.php): failed to open stream: No such file or directory
File: /var/fog/apps/app58082/calert.phpfogapp.com/view/student/index.php

Any ideas what to do?

Random Joe
  • 640
  • 4
  • 10
  • 25
  • have you check permission on view folder & header.php ? – GBD Sep 22 '12 at 13:55
  • @GBD the file and folder have the right permission. I can access the header.php directly from the url but not via include. I'm getting more and more convinced this have something to with PHPFog. It works fine in localhost. – Random Joe Sep 23 '12 at 18:12
  • Try to print $_SERVER['DOCUMENT_ROOT'] and join with /view/header.php ? – GBD Sep 23 '12 at 18:15

0 Answers0