Hi I am trying to install and running a software called 'Article Site Builder'
Have installed everything successfully but when trying to run get an error of
Warning: file_get_contents() [function.file-get-contents]: Filename cannot be empty in /home/cyberpro/public_html/asb/mine_content.php on line 39
Line 39 reads as below in red...
// Return an array of the article title, author, text, and resource box $open=open tag for FULL PAGE content
function mine_article($url,$open,$close)
{
$raw_page=file_get_contents($url);
$content=pull($raw_page,$open,$close);
global $tag_list;
$first=pull_chop($content,$tag_list['title_o'],$tag_list['title_c']);
global $d;
if ($d=2){$add=1;}
if($d=0||$d=2){$add=0;}
$title=substr($first[0],strlen($tag_list['title_o'])+$add);
$second=pull_chop($first[1],$tag_list['author_o'],$tag_list['author_c']);
$author=substr($second[0],strlen($tag_list['author_o']));
$third = pull_chop($second[1],$tag_list['text_o'],$tag_list['text_c']);
$text = substr($third[0],strlen($tag_list['text_o']));
$fourth=pull_chop($third[1],$tag_list['resource_o'],$tag_list['resource_c']);
$box=substr($fourth[0],strlen($tag_list['resource_o']));
$article = array('title'=>$title,'author'=>$author,'text'=>$text,'resource_box'=>$box);
return $article;
}
Hope someone can assist...
Many Thanks..
Re getting Error in a PHP program
Moderator: General Moderators
-
cpetercarter
- Forum Contributor
- Posts: 474
- Joined: Sat Jul 25, 2009 2:00 am
Re: Re getting Error in a PHP program
At some point your script is calling the function mine_article() with an empty value (eg '') for $url. Try echoing out the value of $url (echo "Value of $url : " . $url;) each time the function is called until you find the one which is empty.