Jump to content

Includes not Including..


psquillace

Recommended Posts

Hello All:

              I am having this problem with my site at http://www.stevan.com/newsite. The problem is with SSI and getting the part that says Scripture Today under the menu.

 

I have it including a file called func.php (attached) but it is not pulling from my server. I have changed directories and done everything I could think of but I still do not understand.

 

Can someone look at this for me and tell me what I am doing wrong.

 

thanks for any help you can give.

 

Paul

 

[attachment deleted by admin]

Link to comment
https://forums.phpfreaks.com/topic/50242-includes-not-including/
Share on other sites

ok, so it is including in the site now otherwise you would not see the - dash- that I have in my html output part. The part that is not showing is the sripture part that is in a file called scripture .db

 

should I try and change the name of that to .txt file to see if php will read it?

 

any help would be appreciated.

 

Paul

try it like that:

<?php
   $filename = 'file.txt';
   $content = "";
   if (file_exists($filename) === true && ($filesize = filesize($filename)) > 0) {
      $fp = fopen($filename, 'r');
      $content = fread($fp, $filesize);
      fclose($fp);
   }
   echo $content;
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.