Re: require_once adds a "1"
| From: | Gary | Date: | Fri, 07 Mar 2003 17:09:42 +0000 |
| Subject: | Re: require_once adds a "1" | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-138661@lists.php.net to get a copy of this message | ||
Thank you for your replies they are appreciated,
I've tried a few things in response to your answers but all I can get is
either "1" by it self or no include. Ernest is correct in assuming there is
code in the included file it is as follows
perhaps you can see my mistake?
Gary
-----------------------[snip-----------------------
<?php
function getTopPlugins()
{
$sPage = "";
$sContent = " Not available.";
// download the page
$fh = fopen("http://www.anyurl.html");
if($fh)
{
while( NULL != ($sLine = fgets($fh, 4096)))
{
$sPage .= $sLine;
}
fclose($fh);
// get the content
$sPage = ereg_replace("\n", " ", $sPage);
if(ereg("\<\!\-\- \{XSCL\:BODY\:BGN\} \-\-\>(.*)\<\!\-\-
\{XSCL\:BODY\:END\} \-\-\>", $sPage, $substrs))
{
$sContent = $substrs[1];
}
}
return $sContent;
}
echo getTopPlugins();
?>
--------------[snip]----------------------