Fancybox iframe not including with PHP



这可能是一个简单的问题,但我无法弄清楚。

我有按钮,当我单击"按钮" fancybox时,将打开一个使用网站页面的iframe。它不受发送电子邮件的简单表格。一切正常,除了我使用lib.phpmailer,但我似乎不能包括它。

include_once 'url/classes/lib.phpmailer.php';

我使用的URL是有效的,并导致phpmailer文件。但是iframe不包括它。

任何iDees如何解决这个问题?

一些代码:

<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'
});

储备Form.php

include_once 'url/classes/lib.phpmailer.php';
HTML and stuff

我还尝试包括athor文件,但没有工作。

我找到了解决方案,这很奇怪。

../../classes/lib.phpmailer.php

这个有效。绝对和相对路径无效的怪异。嗯,因为我使用php和javaScript,所以没有太多让我感到惊讶的。

我的根部是在Java和PHP中编程,JavaScript是一个完全不同的bunch哈哈。

感谢您的回复

最新更新