Hi everyone!
I already posted this one in the 'coding' forum, but noone seems to have an idea there, so i'll try my luck in here...
I have run into a problem i've been trying to figure out for two days straight now, but i can't figure it out...
I'm working on a program that stores incoming emails with their attachments in a database. I use a php script as a parser that gets the mails piped to via shebang.
Now for the problem:
Everything worked as expected until I decided to encapsulate the attachment data in a seperate class.
I 'include'd the attachment-class definition file along with all the other classes, but suddenly the script execution stops right after the require command is executed.
However, even though i included an
error_reporting(E_ALL);
in every source file, i don't get any error reported.
Here is the class-definition include code, though i don't think there's anything wrong with it.
require($class_basedir."mysqldb.php");
fputs($GLOBALS['error'],++$countit);
require($class_basedir."message.php");
fputs($GLOBALS['error'],++$countit);
//this is were the execution stops
require($class_basedir."attachment.php");
fputs($GLOBALS['error'],++$countit);
If I try to print or echo anything from the class-file, it doesn't work, though the php.exe utters no errors if i let it parse this file directly.
Here is the classdef-file for the attachments:
<?php
error_reporting('E_ALL');
class attachment
{
var $data; #Binary data
var $type; #Extension
var $name; #Filename
var $p_id; #dbID of msg
function attachment($nname, $ntype, $ndata, $np_id)
{ $this->name=$nname;
$this->type=$ntype;
$this->data=$ndata;
$this->p_id=$np_id;
}
//function {...}
//A few small functions follow hereafter, but i checked and double-//checked every bracket and every ' in them...
}
?>
I don't know what to do anymore, since the file is constructed in exactly the same manner in which i did all the other classes, and they work absolutely fine...
PLEASE HELP!