Ask a Question related to PHP Development, Design and Development.
-
ebobnar #1
including files in other directories
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:\Programming\php\jpgraph-1.14\src\jpgraph.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($_SERVER['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
ebobnar Guest
-
Including files with a control
I am attempting to make an ASP.NET server control (inheriting from System.Web.UI.Control) and, when the control is dragged from the Visual Studio... -
Including text files in Modules
Greetings, Q1. Is it possible to include txt files (as data sources) inside a Perl package? (not to dump the contents as some kind of variables;... -
How to secure files and directories in asp.net
Hi, How can i secure files and directories in asp.net ..... i'm using form based authentication to secure my asp.net pages but when any user... -
Including files to pick up variables
Hey there, what is the best way of including a Perl so that the contents of it override the existing variables. For example, I have: <main Perl... -
Comparing directories and files
I have directories with sub directories where the same files have been placed in both areas, with differing dates and updates. How can I "compare"... -
Tim Tyler #2
Re: including files in other directories
ebobnar <ebobnar74@yahoo.com> wrote or quoted:
That should normally work.> include ("jpgraph/jpgraph-1.14/src/jpgraph.php"); //(relative
> path without leading slash)
--
__________
|im |yler [url]http://timtyler.org/[/url] [email]tim@tt1lock.org[/email] Remove lock to reply.
Tim Tyler Guest
-
Shawn Wilson #3
Re: including files in other directories
ebobnar wrote:
>
> 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:\Programming\php\jpgraph-1.14\src\jpgraph.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:This should work (or the absolute path). You also have to make sure the owner> include ("jpgraph/jpgraph-1.14/src/jpgraph.php"); //(relative
> path without leading slash)
of the PHP files have permission to access the directory and the libraries.
What are the permissions set to on the directory and files? What error are you
getting? --> error_reporting(E_ALL)
Shawn
--
Shawn Wilson
[email]shawn@glassgiant.com[/email]
[url]http://www.glassgiant.com[/url]
Shawn Wilson Guest



Reply With Quote

