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. 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.
include_once 'url/classes/lib.phpmailer.php';
The url that i am using is valid and leads to the phpmailer file. But the iframe does not include it.
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
include_once 'url/classes/lib.phpmailer.php';
HTML and stuff
I also tried to include athor files, but none do work.
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.
My roots are programming in Java and PHP, javascript are a whole different bunch haha.
thanks for the replies
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.