Navigation
Supportsider
Senest Online
kn-aa01:05:46
HenningS 1 Dag
helmuth 6 Dage
mauran 1 Uge
afoster 1 Uge
orgermer 1 Uge
iceman50 2 Uger
ejvindh 2 Uger
Henrik Bendtsen 2 Uger
Michael Mogensen 2 Uger
Besøgende
Gæster online: 7

Brugere online: 0

Antal brugere: 168
Nyeste bruger: Michael Mogensen
Se indlæg
PHP-Fusion - Danmark » PHP-Fusion version 7 » MODs & Infusioner v7
 Udskriv debat
Panel Code Needed
afoster
Jeg har forsøgt at oprette et panel, der vil trække oplysninger fra en kalender i en anden mappe og vise en liste over kommende begivenheder i et panel. Jeg kan ikke synes at regne ud, hvordan du indtaster koden for at få dette til at ske. Dette er hvad jeg har forsøgt at gøre.

PHP
  1. openside('Side block');
  2. ?>
  3.  
  4. <!-- html code goes here -->
  5. require("http://domainname.com/calendar/display03.php");
  6.  
  7. <?php
  8. closeside();


Det virker ikke. Enhver hjælp ville blive meget værdsat.
Redigeret af afoster d. 13-04-2019 06:05
 
flj
Most servers do not allow the use include/require across domains, as it represents a security issue. If allowed, allow_url_include should be set in php.ini configuration file.

But you can achieve the same using for example:

<?php
openside('Side block');
echo(file_get_contents('http://www.domainname.com/calendar/display03.php'));
closeside();
?>

 
afoster
Thanks for your response, but unfortunately it is still not displaying the information from the file. I just get a blank panel. I guess it can't be done.
 
flj
If it does NOT work, the error is to be found another place. It’s standard and it works.
 
afoster
I'm trying to do this on version 8.00.21...do you think that has something to do with it because all I get is a blank panel. Where else should I look for the error. If I enter the url I want displayed out of php-fusion, it works fine so the url is correct.
 
flj
I don't know. It's hard to say without insight.

I would start putting the file_get_contents line in a separate new php file, and test it here. If this does work it's something with the remaining code or phpfusion.
 
afoster
I think I found the problem...my webhost has disabled allow_url_fopen=0 in the configuration and I don't believe I have access to the php.ini file to fix it. Perhaps I can get it done through the wrapper infusion and display it that way, although I wanted it to be visible to the user as soon as they get to the home page without having to click on a link. If you have any suggestions on doing that, I would appreciate any input.
 
flj
you can also use curl or maybe an old school html <iframe>
 
Spring til debat: