Reply to Help with Class

Your name:

Reply:


Posted by "Ian Barnes" on 09/07/05 18:30

Hi,



I am writing a site where I need to access multiple classes of the same name
located under certain directories. The reason for each directory is because
the class under that directory talks only to the files in that directory and
cant do multiple (its not my software)



I have it so that I choose which ones I want to "post" to via checkboxes. I
then do a foreach loop and here it is:



foreach ( $forums as $num=>$val )

{

$db = new db ( 'localhost' , 'user' ,
'pass' , 'db' );

$sql = 'SELECT * FROM table WHERE id =
"'.$val.'"';

$result = $db->get($sql);

$fetchd = mysql_fetch_array ( $result );

$forumid = $fetchd['forumid'];

$posterid = $fetchd['posterid'];

$title = $_POST['title'];

$desc = $_POST['desc'];

$post = $_POST['post'];

require_once (
$fetchd['path'].'sdk/ipbsdk_class.inc.php' );

$SDK =& new ipbsdk;

$info = $SDK -> get_info ( $posterid );

$postername = $info['name'];

echo "Forum ID:".$forumid;

echo "<BR>Title:".$title;

echo "<BR>Desc:".$desc;

echo "<BR>Post:".$post;

echo "<BR>PosterID:".$posterid;

echo "<BR>PosterName:".$postername;

echo "<BR>";

}



See at the end of that foreach loop I need to unset the class $SDK so I can
re-init it from another dir. How can I do this? I have tried some of the
following:

Unset ( $SDK);

Unset ($GLOBALS['SDK'] );





Can anyone shed any light on my predicament ?



Thanks in advance

Cheers

Ian

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация