BeBot - An Anarchy Online and Age Of Conan chat automaton

Development => Coding and development discussion => Topic started by: Nanoflux on March 31, 2007, 12:11:39 pm

Title: Imploding text file inside blob
Post by: Nanoflux on March 31, 2007, 12:11:39 pm
I'm trying to make a blob with other blobs inside that get their content from a .txt file

Ive tried
Code: [Select]
$this -> bot -> make_blob("Subway", implode("", file("./guides/subway.txt")));and
Code: [Select]
"<a href='text://" . implode("", file("./guides/subway.txt")) . "'>Test</a>";
But they just seem to load the text file as the blob name. The complete end section looks like this though:
Code: [Select]
   /*
     Makes guides list
   */
   function links_list($name)
   {
       $result="";
       $result .= "<font color=CCInfoHeadline><center>Guides</center>";
       $result .= "\n";
       $result .= "\n";
       $result .= "<a href='text://" . implode("", file("./guides/subway.txt")) . "'>Test</a>";
       $result .= "\n";
       
       return "I know this " . $this -> bot -> make_blob("knowledge", $result);
    }
}
?>

Thanks
Title: Re: Imploding text file inside blob
Post by: Alreadythere on March 31, 2007, 01:30:12 pm
You can't make blobs inside of blobs, item refs being the exception.

Only way is to make links executing commands that return the inside blobs as results.
Title: Re: Imploding text file inside blob
Post by: Blueeagle on March 31, 2007, 01:32:55 pm
http://php.net/file_get_contents (http://php.net/file_get_contents) for teh win

Edit: And I think the word you're looking for is "import" not "implode"
Title: Re: Imploding text file inside blob
Post by: Nanoflux on March 31, 2007, 01:41:30 pm
You can't make blobs inside of blobs, item refs being the exception.

Only way is to make links executing commands that return the inside blobs as results.

Ill have to attempt at that then

thanks for quick replies
SimplePortal 2.3.7 © 2008-2024, SimplePortal