2012-10-29 29 views
3

幫幫我吧,我要嵌入的PHP版本梅勒5.1圖像..和我的PHP版本是5.4.7功能set_magic_quotes_runtime()中的PHPMailer已經過時

腳本執行是成功的,並且可以接收電子郵件與嵌入圖像,但問題是出現警告這樣的:

推薦使用:功能set_magic_quotes_runtime()中C被棄用:\ XAMPP \ htdocs中\上線形式\ class.phpmailer.php 1480

棄用:函數set_magic_quotes_runtime()在C:\ xampp \ htdocs \ form \ class中已棄用。 phpmailer.php上線1484

和我的腳本是

$mail->AddEmbeddedImage('filename', 'cid', 'name'); 
$mail->AddEmbeddedImage('sgu_logo.gif', 'my-pics', 'sgu_logo.gif'); 

$mail->Body  = "Thank you for registering at SGU. For further processing please complete a registration fee before &nbsp; ". $e['testschedule']." <br> For future information please contact us at sgu.ac.id/support <br><br> 
<img src='cid:sgu_logo.gif' alt='my-pics' />."; 

回答

-5

添加這些代碼到腳本

@set_magic_quotes_runtime(false); 
ini_set('magic_quotes_runtime', 0); 
+0

不,[magic_quotes_runtime設置](http://php.net/manual/en/info。 configuration.php#ini.magic-quotes-runtime)已被棄用,其[setter]也是如此(http://php.net/manual/en/function.set-magic-quotes-runtime.php)。 – Arjan

+0

原來的問題說,它的工作原理,但警告出現..使用@符號將抑制這些警告。 –

4

這是因爲magic_quotes_runtime的功能已被棄用從PHP 5.3版本開始,但是5.1版本的PHPMailer仍然使用它們。嘗試升級到5.2 PHPMailer的,問題應該可以解決,更多的信息在這裏:http://code.google.com/a/apache-extras.org/p/phpmailer/source/detail?r=66

+0

雅我知道,我已經解決了這個問題.. BTW thx antoDippo。呃像我的部長的名字... –

+1

該項目現在維護在GitHub https://github.com/PHPMailer/PHPMailer – Syclone

0

軟件的開發人員經常進行更新的頂部。你可以安裝他們的最新版本,它應該沒有這個警告。