Welcome, Guest. Please login or register.
Did you miss your activation email?
May 26, 2012, 10:21:32 PM

Login with username, password and session length
Search:     Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter hier und auf unserer neuen Webseite.
155555 Posts in 21715 Topics by 7737 Members
Latest Member: gx-world
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: Can I include a wb page within a static page on the same domain?  (Read 366 times)
sparkdigital

Offline Offline

Posts: 348



WWW
« on: January 06, 2012, 05:05:37 PM »

Hi all,

I'd like to display a wb page within a static (non wb) page that is on the same domain. I was thinking of using a simple php include for this, like:

Code:
<?php
include("http://www.thegreatlakesescape.co.uk/cms/pages/availability.php");
?>

But this doesn't seem to be working. Anything I'm doing wrong? Is there a way to get this going?

Thanks!

Konrad
Logged
marmot

Offline Offline

Posts: 209


« Reply #1 on: January 06, 2012, 05:20:35 PM »

Hi,

it seems this page cannot be called directely from here. Maybe it's hidden, non-public or something like that? Or just a simple typo in url? As long as you can't call this page you can't include it.

regards
Logged
sparkdigital

Offline Offline

Posts: 348



WWW
« Reply #2 on: January 06, 2012, 05:29:23 PM »

Oops, my bad - I was messing around with the actual availability.php file in the pages directory. Now fixed - can you please try again?

Thanks,

Konrad
Logged
jacobi22
Betatester
*
Offline Offline

Posts: 1376


WWW
« Reply #3 on: January 06, 2012, 06:31:23 PM »

It works, whats the Problem?
Logged

LG Uwe

Wer sagt, Reichtum ist alles, hat nie ein Kind lächeln gesehen.
sparkdigital

Offline Offline

Posts: 348



WWW
« Reply #4 on: January 06, 2012, 06:40:22 PM »

The wb page itself works but I'm trying to display this page within a static php page on the same domain but outside of wb (http://www.thegreatlakesescape.co.uk/availability-calendar.php).

So on this page I used the php include command mentioned earlier which doesn't seem to work.

Hope this makes sense.

Thanks,

Konrad
Logged
marmot

Offline Offline

Posts: 209


« Reply #5 on: January 06, 2012, 06:52:01 PM »

Hi,

is there a link to the static page?
The problem might be, that including the whole wb page gives all the page html code including the header agian, inside another pages html, but there is only one head and one html tag allowed (for example). Maybe you could use an iframe to display the wb page?

regards
Logged
jacobi22
Betatester
*
Offline Offline

Posts: 1376


WWW
« Reply #6 on: January 06, 2012, 07:09:26 PM »

Please check the status of allow_url_include in your Server configuration (php.ini) (must be set to 'ON', maybe with this Code
Code:
<?php
phpinfo
();
?>
you can also try this in the top of the static page next row behind <?php

Code:
error_reporting(E_ALL);

to show the PHP-Errors (like: 'URL file-access is disabled in the server configuration'

i test it on a local Server in a php-File with other Code and its works, i see your calenders
Logged

LG Uwe

Wer sagt, Reichtum ist alles, hat nie ein Kind lächeln gesehen.
sparkdigital

Offline Offline

Posts: 348



WWW
« Reply #7 on: January 11, 2012, 03:31:42 PM »

Thanks for your feedback - I got this reply from my host:
Quote
Access to allow_url_include has been disabled on our shared cluster and this has been set to 'off' by default.  If you need access to allow_url_include you will need to upgrade to a VPS or Dedicated server.

Any ideas?

Thanks!

Konrad
Logged
jacobi22
Betatester
*
Offline Offline

Posts: 1376


WWW
« Reply #8 on: January 11, 2012, 03:48:03 PM »

try this in your .htaccess

php_flag allow_url_include On

but look at first in your php.ini to allow_url_fopen. the htaccess-Code works only, if allow_url_fopen = ON
Logged

LG Uwe

Wer sagt, Reichtum ist alles, hat nie ein Kind lächeln gesehen.
sparkdigital

Offline Offline

Posts: 348



WWW
« Reply #9 on: January 11, 2012, 04:42:51 PM »

Thanks for your suggestion, allow_url_open is on so I tried your htaccess text but this didn't work either...  embarassed

Any more suggestions  undecided

Thanks,

Konrad
Logged
marmot

Offline Offline

Posts: 209


« Reply #10 on: January 11, 2012, 11:25:29 PM »

Hi,

Any more suggestions  undecided
hmm, there's no comment about my iframe suggestion undecided. But if you don't like that you could try a relative path in the include command as "../../wb/index.php" or domain relative like "/wb/index.php" for example.

regards
Logged
mr-fan

Offline Offline

Posts: 1556


WWW
« Reply #11 on: January 12, 2012, 08:03:23 AM »

Hi,

:: Ok curl could work:  http://blog.unitedheroes.net/curl/

:: or iframe like marmot wrote

:: or direct Link to the .php page and copy the HTML arround the WB php for a "blank like Template"
.....let me explain...

it's like a "hardcopy of the whole html page" and you put some needed vars in this template like pagecontent() or what you need for dynamic output...

it's more than a html filled blank template with some WB Vars for the dynamic content you fill with WB Backend.

Regards mr-fan
Logged

 
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!