I am getting trouble with the following lines of code. Actually I have created a custom file confirm_email.php
in which I wrote the following piece of code. When I'm removing $temp_dir variable
it works fine, but when I include it, this page returns internal server error
$temp_dir = get_template_directory_uri();
$url = $temp_dir."/confirm_email.php?id=".$_REQUEST['id']."&key=".$_REQUEST['key'];
$message = "Username:".$_REQUEST['name']."Click on below link to confirm your email;".$url;
$subject = "Email confirmation Link";
$headers = "From: wordpress@property-penang.com" . "\r\n";
if ( mail( $_REQUEST['email'], $subject, $message, $headers ) ) {
echo "1";
} else {
echo "0";
}