$_SERVER['DOCUMENT_ROOT doesn't work

the mail() function

Moderators: macek, egami, gesf

New php-forum User
New php-forum User
Posts: 2
Joined: Tue Nov 06, 2012 5:56 am

$_SERVER['DOCUMENT_ROOT doesn't work

Postby yang » Wed Nov 21, 2012 6:55 am

im using phpmailer to send email, what is confusing me is that: (this actually is not a problem about phpmailer, but is what did i face when i tried to call phpmailer class in my php file)

firstly, i tried to include the phpmailer class file by:
it didn't work. it said "files can't find".

then i tried: require("config.php");
require "lib/MailClass.inc"; it works

could someone explain this for me?

really confusing now


php-forum Fan User
php-forum Fan User
Posts: 973
Joined: Mon Oct 01, 2012 12:32 pm

Re: $_SERVER['DOCUMENT_ROOT doesn't work

Postby seandisanti » Fri Nov 23, 2012 2:44 pm

try echoing those values instead of requiring them

Return to “PHP coding => Mail”

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest