Welcome to Geeklog, Anonymous Saturday, November 30 2024 @ 07:36 am EST
Geeklog Forums
Error message on php include on static page
Status: offline
my3shadows
Forum User
Newbie
Registered: 02/29/04
Posts: 13
I'm trying to pull in an external web page as a php include on a static page and am getting the following error:
Line 3 is where my include statement is which is...
Any idea what this error means and what I might be able to do to fix it? I looked on the php site and it mentions fseek, but I'm not php saavy enough to understand exactly what it was talking about.
BTW, I'm using 1.3.8 w/ static pages 1.3...
Thanks,
Rachael
Warning: Unknown(): stream does not support seeking in /home/themommy/public_html/staticpages/index.php(78) : eval()'d code on line 3
Line 3 is where my include statement is which is...
include_once("http://thewebpageI'mtryingtopointo,whichisminebtw");
Any idea what this error means and what I might be able to do to fix it? I looked on the php site and it mentions fseek, but I'm not php saavy enough to understand exactly what it was talking about.
BTW, I'm using 1.3.8 w/ static pages 1.3...
Thanks,
Rachael
11
8
Quote
Status: offline
my3shadows
Forum User
Newbie
Registered: 02/29/04
Posts: 13
file did not work, but readfile did!
Thanks! You just made my life a little easier...
I'll look into the external pages plugin though, that might be the better way to do it.
Rachael
Thanks! You just made my life a little easier...
I'll look into the external pages plugin though, that might be the better way to do it.
Rachael
11
9
Quote
Status: offline
Uffe
Forum User
Junior
Registered: 02/01/04
Posts: 30
I tried to put this code into my static pages but it did not come out with anything:
<? readfile("http://www.geeklog.net/forum/viewtopic.php?forum=2&showtopic=33161&highlight=include" ?>
Can you show me your codes ! it will made my life a little easier to
/Uffe
<? readfile("http://www.geeklog.net/forum/viewtopic.php?forum=2&showtopic=33161&highlight=include" ?>
Can you show me your codes ! it will made my life a little easier to
/Uffe
9
16
Quote
Status: offline
mthomas
Forum User
Full Member
Registered: 04/18/04
Posts: 148
<?
$externalfile = readfile("http://www.geeklog.net/forum/viewtopic.php?forum=2&showtopic=33161&highlight=include"
echo $externalfile
?>
Or to wrap it in Geeklog use
?>
//adjust the ../ based on where you page is located
require_once('../lib-common.php';
$display = COM_siteHeader();
$display .= COM_startBlock("An External File"
$display .= readfile("http://www.geeklog.net/forum/viewtopic.php?forum=2&showtopic=33161&highlight=include"
$display .= COM_endBlock();
$display .= COM_siteFooter(false);
echo $display;
?>
$externalfile = readfile("http://www.geeklog.net/forum/viewtopic.php?forum=2&showtopic=33161&highlight=include"
echo $externalfile
?>
Or to wrap it in Geeklog use
?>
//adjust the ../ based on where you page is located
require_once('../lib-common.php';
$display = COM_siteHeader();
$display .= COM_startBlock("An External File"
$display .= readfile("http://www.geeklog.net/forum/viewtopic.php?forum=2&showtopic=33161&highlight=include"
$display .= COM_endBlock();
$display .= COM_siteFooter(false);
echo $display;
?>
8
12
Quote
Status: offline
mthomas
Forum User
Full Member
Registered: 04/18/04
Posts: 148
It works if you enable php for static pages.
That said someparts will not work.
It will break links. Specfically links that do not supply a full href URL.
A full href URL would be http://somewhere.com/index.php
this script will break links that only list as href=filename. When the browser sees the link it would link as http://yoursite.com/filename.
Try iframe if you find that links are breaking. Only probably is iframe can be hard to setup to display the whole page without placing a scrolbar in the center of you page.
That said someparts will not work.
It will break links. Specfically links that do not supply a full href URL.
A full href URL would be http://somewhere.com/index.php
this script will break links that only list as href=filename. When the browser sees the link it would link as http://yoursite.com/filename.
Try iframe if you find that links are breaking. Only probably is iframe can be hard to setup to display the whole page without placing a scrolbar in the center of you page.
11
11
Quote
All times are EST. The time is now 07:36 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content