[英]Fancybox iframe not including with PHP
這可能是我遇到的一個簡單問題,但我無法弄清楚。
我有一個按鈕,當我單擊按鈕時,fancybox將打開一個帶我網站頁面的iframe。 它包含一個用於發送電子郵件的簡單表格。 一切正常,除了我之外,我都使用lib.phpmailer,但似乎無法包含它。
include_once 'url/classes/lib.phpmailer.php';
我正在使用的url有效,並導致phpmailer文件。 但是iframe不包含它。
任何想法如何解決這個問題?
一些代碼:
<a class="reserve"
href="http://<?=$_SERVER['HTTP_HOST'];?>/pages/includes/reserveform.php"
id="reserve">
Reserve
</a>
$("a#reserve").fancybox({
'autoScale': true,
'width': 460,
'height': 440,
'padding': 20,
'showCloseButton': true,
'type': 'iframe'
});
reserveform.php
include_once 'url/classes/lib.phpmailer.php';
HTML and stuff
我也嘗試包括athor文件,但沒有一個起作用。
我找到了解決方案,這很奇怪。
../../classes/lib.phpmailer.php
這個作品。 絕對路徑和相對路徑不起作用的怪異。 很好,因為我使用PHP和Javascript,所以沒有太多讓我驚訝的東西。
我的根源是使用Java和PHP進行編程,而javascript則完全不同。
謝謝你的答復
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.