<?php include 'gallery/index.php'; ?> <?php include 'gallery/index.php'; ?>
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

<?php include 'gallery/index.php'; ?>

Started by mlin, November 29, 2003, 07:59:57 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mlin

I would like to have my gallery displayed alongside my homepage's main content without using IFRAMES, as shown in this example:
http://www.defencetalk.com/pictures

So I use the following PHP code to include the gallery index on my homepage <?php include 'gallery/index.php'; ?>

However, I am getting errors:

When my homepage is in a DIFFERENT directory as that of the gallery:

Warning: main(include/config.inc.php): failed to open stream: No such file or directory in /home/ml/public_html/www/gallery/include/init.inc.php on line 135

Fatal error: main(): Failed opening required 'include/config.inc.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/ml/public_html/www/gallery/include/init.inc.php on line 135

When I put the homepage in the SAME directory as the gallery:

Warning: Cannot modify header information - headers already sent by (output started at /home/ml/public_html/www/gallery/index2.php:7) in /home/mlin/public_html/www/gallery/themes/water_drop/theme.php on line 790

Warning: Cannot modify header information - headers already sent by (output started at /home/ml/public_html/www/gallery/index2.php:7) in /home/ml/public_html/www/gallery/include/functions.inc.php on line 51

Any ideas on how to fix this? Thanks a lot!

Joachim Müller

well, simply speaking: you can't php-include coppermine! Instead, you'll have to modify the looks of your homepage to fit into the overall theme of coppermine (or change the coppermine theme to look like the rest of your homepage, your choice). If you're not familiar with the errors you got I say don't try experimenting with php-includes at all, since they are most familiar and should already point you into the right direction. If you want to find out about the "why"s, take a deep look at php.net, but in fact you can just forget about the include stuff and try my recommendation from the first paragraph...

GauGau