梨邮件包括p

时间:2012-06-11 04:01:22

标签: email pear mime

我使用或尝试使用pear mail和mime时出现500服务器错误。下面的最后一行代码导致500错误 - “$ message = new mime();”。显然,找不到文件我对这条路有信心。

<?

require_once('../php/mail/mime.php');
require_once('../php/Mail.php');


$upload_folder = "res_upload/";

//Get the uploaded file information
$name_of_uploaded_file =
basename($_FILES['uploaded_file']['name']);
//get the file extension of the file
$type_of_uploaded_file =
substr($name_of_uploaded_file,
strrpos($name_of_uploaded_file, '.') + 1);
$size_of_uploaded_file =
$_FILES["uploaded_file"]["size"]/1024;//size in KBs

//Settings
$max_allowed_file_size = 100; // size in KB
//Validations
if($size_of_uploaded_file > $max_allowed_file_size )
{
$errors .= "\n Size of file should be less than $max_allowed_file_size KB";
} 



//copy the temp. uploaded file to uploads folder
$path_of_uploaded_file = $upload_folder . $name_of_uploaded_file;
$tmp_path = $_FILES["uploaded_file"]["tmp_name"];
if(is_uploaded_file($tmp_path))
{
if(!copy($tmp_path,$path_of_uploaded_file))
{
$errors .= '\n error while copying the uploaded file';
}
} 
$to = "pfcowboy@gmail.com";
$message = new mime();
?>

服务器上错误文件中的错误消息显示为:

[10-Jun-2012 19:58:43] PHP致命错误:require_once()[function.require]:无法打开所需的'../php/mail/mime.php'(include_path ='。:/第9行/home7/cbceduca/public_html/employee_job_submission_processor.php中的usr / lib64 / php:/ usr / lib / php:/ usr / share / pear:/ home7 / cbceduca / php')

我确信路径正确但我无法打开文件。我也在文件夹上设置了0777的权限。任何我可能会出错的想法都会受到热烈欢迎。

0 个答案:

没有答案