hello there. - just can't seem to get a result from a function called in its class...
require_once($_SERVER['DOCUMENT_ROOT']."/youradmin_v2/scripts/php/IPTC.php");
class Media{
function Media() {
// connects to db
}
function getMetaData($mediaID){
global $select;
$mediaDB = $select->mediaSelect($mediaID);
$filePath=$mediaDB['filePath'];
$itpc =new Image_IPTC($filePath);
return $itpc->getTag($tag,0)." called?";
}
function newFileProcessing($file_name){
global $func;
global $select, $insert, $update;
$mediaID=$insert->addMedia($file_name, $filetype, $filePathImg,$testI);
$mediaDB = $select->mediaSelect($mediaID);
$filePath=$_SERVER['DOCUMENT_ROOT'].$mediaDB['pathToFile'];
$update->updateQuery('media',"title='".$this->getMetaData($mediaID)."'");
}
}
$media = new Media;
when i use $media->getMetaData($mediaID) on a php page it works? No errors and when its called in the class " called?" is added to the entry so i think its somink to do with the $itpc =new Image_IPTC($filePath) part which can be viewed here;
can anyone see what i'm doing wrong?! any pointers appreciated.
best, dan.