psquillace Posted May 6, 2007 Share Posted May 6, 2007 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 More sharing options...
psquillace Posted May 6, 2007 Author Share Posted May 6, 2007 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 Link to comment https://forums.phpfreaks.com/topic/50242-includes-not-including/#findComment-246671 Share on other sites More sharing options...
trq Posted May 6, 2007 Share Posted May 6, 2007 should I try and change the name of that to .txt file to see if php will read it? Includes can have any file extension you want, iff however that file contains php code you should give it the .php extension for securities sake. Link to comment https://forums.phpfreaks.com/topic/50242-includes-not-including/#findComment-246678 Share on other sites More sharing options...
psquillace Posted May 6, 2007 Author Share Posted May 6, 2007 no, there is not php in it. Just a plain text file that I made. Link to comment https://forums.phpfreaks.com/topic/50242-includes-not-including/#findComment-246684 Share on other sites More sharing options...
Lumio Posted May 6, 2007 Share Posted May 6, 2007 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; ?> Link to comment https://forums.phpfreaks.com/topic/50242-includes-not-including/#findComment-246685 Share on other sites More sharing options...
suttercain Posted May 6, 2007 Share Posted May 6, 2007 should I try and change the name of that to .txt file to see if php will read it? WWJD? Link to comment https://forums.phpfreaks.com/topic/50242-includes-not-including/#findComment-246717 Share on other sites More sharing options...
Lumio Posted May 6, 2007 Share Posted May 6, 2007 ? What would Jesus do? Ahm I don't know if he does anything Link to comment https://forums.phpfreaks.com/topic/50242-includes-not-including/#findComment-246808 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.