Guillaume wrote:
Tom a écrit :
>Hi all i have problem with include function in my code after change
php4 to php5.
after standard html code i put in html body <? include
("filename.php"); ?and close body and html.
With php4 i got pictures from php file but now in php5 i got blank page.
any suggestion?
tnx
First, use <?php instead of <?
Second... If I understand, filename.php generates a picture. Then, don't
"include" it, rather use echo '<img src="filename.php" />';
If I had to guess, the problem is definitely the first one. If it works
in PHP 4, the file doesn't return a raw image, as HTML doesn't change
depending on the PHP version. A default disable of short_tags does :).
Probably the OP has a nice <? include(..);?in his HTML source, which
is discarded/not shown as a malformed HTML tag in most UA's. So an extra
note to the OP: validating pages (
http://validator.w3c.org) is a good
thing when output is rendered in an unexpected manner.
--
Rik Wasmus
[SPAM]
Now looking for some smaller projects to work on to fund a bigger one
with delayed pay. If interested, mail rik at rwasmus.nl
[/SPAM]