php5 and include problem

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hi all i have problem with include function in my code after change php4 to

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?

Re: php5 and include problem

Tom a écrit :
Quoted text here. Click to load it

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 not, then the code from filename.php should be required, cause your
problem is quite unclear atm but one thing is sure, the problem doesn't
come from the "include" function, rather from the included code...


Re: php5 and include problem

Guillaume wrote:
Quoted text here. Click to load it

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 ( ) is a good
thing when output is rendered in an unexpected manner.
Rik Wasmus
Now looking for some smaller projects to work on to fund a bigger one
with delayed pay. If interested, mail rik at

Re: php5 and include problem

TNx for help!

Quoted text here. Click to load it

Site Timeline