473,405 Members | 2,261 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

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
Jul 17 '05 #1
2 2656
ebobnar <eb*******@yahoo.com> wrote or quoted:
include ("jpgraph/jpgraph-1.14/src/jpgraph.php"); //(relative
path without leading slash)


That should normally work.
--
__________
|im |yler http://timtyler.org/ ti*@tt1lock.org Remove lock to reply.
Jul 17 '05 #2
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:
include ("jpgraph/jpgraph-1.14/src/jpgraph.php"); //(relative
path without leading slash)


This should work (or the absolute path). You also have to make sure the owner
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
sh***@glassgiant.com
http://www.glassgiant.com
Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: WindAndWaves | last post by:
Hi Gurus I hope I am going to make sense with this question: I have an html page that I have turned into a php page with a bit of php code above the html (connect to database, massage data a...
10
by: TokiDoki | last post by:
Hello there, I have been programming python for a little while, now. But as I am beginning to do more complex stuff, I am running into small organization problems. It is possible that what I...
4
by: Jerry | last post by:
I'm having just a bit of trouble wrapping my brain around the task of working with folders that are above the site's root folder. I let users upload photos (.jpg/.gif files) which can...
2
by: shruti | last post by:
hiii all I'm tryin to call a perl script from a C program in following 2 ways- 1.By callin system function. But there's some problem because the system function is not able to executeany...
1
by: shruti | last post by:
hiii all I'm tryin to call a perl script from a C program in following 2 ways- 1.By callin system function. But there's some problem because the system function is not able to executeany...
4
by: rn5a | last post by:
I have a ListBox which should list all the files & directories that exist in a particular directory. The problem is I can get the ListBox to list either all the files or all the directories but not...
7
by: elgiei | last post by:
Good morning at all, i have to implement a server,that every n-seconds (eg. 10sec) sends to other clients,which files and directory has been deleted or modified. i build a n-tree, for each...
2
by: junaid | last post by:
Hi, please help me i want to select multiple files including directories using OpenFileDialog, but i cant get directory name(s) in FileNames property i am using J#, VS2005 are there any method...
65
by: Hongyu | last post by:
Dear all: I am trying to write to a file with full directory name and file name specified (./outdir/mytestout.txt where . is the current directory) in C programming language and under Unix, but...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.