Jump to content

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;
?>

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.