[英]Fancybox iframe not including with PHP
This might be a simple problem i have but i cant figure it out. 这可能是我遇到的一个简单问题,但我无法弄清楚。
I have button, when i click on the button fancybox opens an iframe with a page of my website. 我有一个按钮,当我单击按钮时,fancybox将打开一个带我网站页面的iframe。 It containts a simple form for sending a e-mail.
它包含一个用于发送电子邮件的简单表格。 Everything works fine and all but i make use of the lib.phpmailer but i cant seem to include it.
一切正常,除了我之外,我都使用lib.phpmailer,但似乎无法包含它。
include_once 'url/classes/lib.phpmailer.php';
The url that i am using is valid and leads to the phpmailer file. 我正在使用的url有效,并导致phpmailer文件。 But the iframe does not include it.
但是iframe不包含它。
Any idees how to resolve this? 任何想法如何解决这个问题?
Some code: 一些代码:
<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 reserveform.php
include_once 'url/classes/lib.phpmailer.php';
HTML and stuff
I also tried to include athor files, but none do work. 我也尝试包括athor文件,但没有一个起作用。
I have found the solution, which was pretty odd. 我找到了解决方案,这很奇怪。
../../classes/lib.phpmailer.php
This one works. 这个作品。 Weirdness that the absolute and relative path didnt work.
绝对路径和相对路径不起作用的怪异。 Ah well since i use PHP and Javascript, there isnt much that doesnt suprise me.
很好,因为我使用PHP和Javascript,所以没有太多让我惊讶的东西。
My roots are programming in Java and PHP, javascript are a whole different bunch haha. 我的根源是使用Java和PHP进行编程,而javascript则完全不同。
thanks for the replies 谢谢你的答复
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.