Skip to content Skip to sidebar Skip to footer

JpGraph Can't Include PHP File

I am trying to include one PHP file in another PHP file that creates a jpGraph image (The reason is that I am loading mySQL data for the chart, and I want to put the login credenti

Solution 1:

I found what the problem was. I had extra characters after the closing ?>, but I could not see them because they were spaces and newline. These characters messed up the jpGraph image.

Before:

  <?php
  $lhostname="localhost";
  $lusername="joeschmack";
  $lpassword="autumnleaf";
  $ldatabase="customers";
  ?><SPACE><SPACE><NEWLINE>

After:

  <?php
  $lhostname="localhost";
  $lusername="joeschmack";
  $lpassword="autumnleaf";
  $ldatabase="customers";
  ?>

That fixed it! Beware the extra characters!


Post a Comment for "JpGraph Can't Include PHP File"