Ho uppato uno script che ho scaricato su Html.it - ho modificato il codice ed eccolo qui

<?php
include("contact/contact_settings.php");
include("contact/TemplateMailer.class.php");

$temp = new TemplateMailer();

$types = '';

foreach ($reasons as $type => $mail) {
$types .= "<option value=\"$type\">$type</option>\n";
}

$temp->assign('reasons',$types);

$disya = basename($_SERVER['PHP_SELF']);
$disya = str_replace('.php','.tpl.html',$disya);
$temp->assign("template_file",$disya);

$temp->preparemail($template_folder . $disya);

echo $temp->body;


Però mi restituisce un errore:

Warning: file_get_contents() [function.file-get-contents]: Unable to access ./templates/contact.tpl.html in /var/www/vhosts/everynight.it/httpdocs/contact/TemplateMailer.class.php on line 11

Warning: file_get_contents(./templates/contact.tpl.html) [function.file-get-contents]: failed to open stream: No such file or directory in /var/www/vhosts/everynight.it/httpdocs/contact/TemplateMailer.class.php on line 11



Come mai ? :master: :master: