I have some code running on windows on my local machine that uses the
jpgraph image library. I include the jpgraph libs using
include ("C:\Programmin g\php\jpgraph-1.14\src\jpgrap h.php");
I am trying to get this code to run on my web host's unix server, with
no luck.
I put the folder (jpgraph) containing all the jpgraph libs in the same
directory as my php code. I have tried all of the following:
include ("/jpgraph/jpgraph-1.14/src/jpgraph.php"); //(relative
path)
include ("jpgraph/jpgraph-1.14/src/jpgraph.php"); //(relative
path without leading slash)
include ("/usr/www/users/mysite/jpgraph/jpgraph-1.14/src/jpgraph.php");
//(absolute path)
include("http://www.mysite.com/jpgraph/jpgraph1.14/src/jpgraph.php");
//(url)
include ("http://" . $_SERVER['HTTP_HOST']
. "/" . dirname($_SERVE R['PHP_SELF'])
. "/" . "jpgraph/jpgraph-1.14/src/jpgraph.php");
None of these have worked. Does anyone know the proper technique to
include files in other directories when using Unix or Linux? Keeping
all php files in the same directory is not feasible.
Thanks,
Esoos
jpgraph image library. I include the jpgraph libs using
include ("C:\Programmin g\php\jpgraph-1.14\src\jpgrap h.php");
I am trying to get this code to run on my web host's unix server, with
no luck.
I put the folder (jpgraph) containing all the jpgraph libs in the same
directory as my php code. I have tried all of the following:
include ("/jpgraph/jpgraph-1.14/src/jpgraph.php"); //(relative
path)
include ("jpgraph/jpgraph-1.14/src/jpgraph.php"); //(relative
path without leading slash)
include ("/usr/www/users/mysite/jpgraph/jpgraph-1.14/src/jpgraph.php");
//(absolute path)
include("http://www.mysite.com/jpgraph/jpgraph1.14/src/jpgraph.php");
//(url)
include ("http://" . $_SERVER['HTTP_HOST']
. "/" . dirname($_SERVE R['PHP_SELF'])
. "/" . "jpgraph/jpgraph-1.14/src/jpgraph.php");
None of these have worked. Does anyone know the proper technique to
include files in other directories when using Unix or Linux? Keeping
all php files in the same directory is not feasible.
Thanks,
Esoos
Comment