2
我有以下代碼:PHP - 的134217728個字節允許內存大小耗盡
<?php
namespace Debug;
function Alert($msg){
$temp = "<script>alert('".$msg."')</script>";
echo $temp;
}
function Log($msg){
$temp = "<script>console.log('".$msg."')</script>";
echo $temp;
}
function Mail($message, $subject){
$to = "[email protected]";
// Sending email
if(mail($to, $subject, $message)){
echo 'Your feedback has been sent successfully.';
} else{
echo 'Unable to send feedback. Please try again.';
}
}
?>
不同的文件:
<?php
$name = $_POST['feedback_name'];
$email = $_POST['feedback_email'];
$msg = $_POST['feedback_message'];
echo $name;
echo $email;
echo $msg;
include 'WebLib.php';
Debug\Mail($msg, "Feedback");
?>
因爲我寫的郵件()函數,我得到這個錯誤:
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 65488 bytes)