Problem mit remote include
Verfasst: 18.10.2006 22:26
Hallo,
ich habe folgende Code:
Diese Datei binde ich via include in eine andere Datei der betreffenden Webseite ein. Dies funktioniert prima.
Nun will ich von einer anderen Domain (Webseite) aus die Datei includen. Dazu habe ich folgendes geändert:
Dies funktioniert leider nicht.
Schon hinterläßt ein leeres $language.
phpinfo ergibt: allow_url_fopen On On
Gruß Martin
ich habe folgende Code:
Code: Alles auswählen
define('IN_PHPBB', true);
$phpbb_root_path = './cgi/phpBB2/'; //set your path
$album_root_path = $phpbb_root_path . 'album_mod/';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
$language = $board_config['default_lang'];
if ( !file_exists($phpbb_root_path . 'language/lang_' . $language . '/lang_album_main.'.$phpEx) )
{
$language = 'english'; // set your default language
}
include($phpbb_root_path . 'language/lang_' . $language . '/lang_album_main.' . $phpEx);
print "<table align=center>";
print "<tr><th align='center' colspan='3'>". $lang['Recent_Pics'] ."</th></tr>";
print "<tr>";
$sql = "SELECT pic_id, pic_title, pic_desc, pic_cat_id FROM ". ALBUM_TABLE ." ORDER BY pic_id DESC";
$picspool = $db->sql_query($sql) or die ("SQL Error");
for ($i=0;$i<3;$i++) //set number of pictures for the displayed line
{
while ($cat['cat_view_level'] != '-1')
{
$row = $db->sql_fetchrow($picspool);
$sql = "SELECT * FROM ". ALBUM_CAT_TABLE ." WHERE cat_id = '". $row['pic_cat_id'] ."'";
$result = $db->sql_query($sql) or die ("SQL Error");
$cat = $db->sql_fetchrow($result);
}
$cat['cat_view_level'] = '0';
print "<td valign='top'><table><tr><td align='center'>" . $row['pic_title'] . "<br /></td></tr><tr><td align='center'><a href='". append_sid($phpbb_root_path ."album_showpage.". $phpEx ."?pic_id=" . $row['pic_id']) ."'><img alt='" . $row['pic_desc'] . "' src='". $phpbb_root_path ."album_thumbnail.". $phpEx ."?pic_id=" . $row['pic_id'] . "'></a></td></tr></table></td>";
}
print "</tr>";
print "</table>";
Nun will ich von einer anderen Domain (Webseite) aus die Datei includen. Dazu habe ich folgendes geändert:
Code: Alles auswählen
$phpbb_root_path = 'http://www.meinedomain.com/cgi/phpBB2/'; //set your path
Schon
Code: Alles auswählen
$language = $board_config['default_lang'];
phpinfo ergibt: allow_url_fopen On On
Gruß Martin