path problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
rje
Forum Newbie
Posts: 1
Joined: Mon Aug 09, 2010 2:09 am

path problem

Post by rje »

|__www/
|
|__application/
| |__includes.php
|
|__public/
|__index.php

the line in the index.php says require_once ('application/includes.php');
and that includes.php file will have similar require_once which has reference to files under the subfolders of application.
i'm using ubuntu lamp stack. i got this open source project which was first developed in windows environment using the phped.
when i run the application in ubuntu it does not seem to find the path of the application.
i tried require_once(../aplication) and require_once(/home/user/pathname/); seems to work. then i have to modify every other files in the project. but is there a easier way to make the project work as it is? the project also uses the smarty framework.

links to the actual project:
http://code.google.com/p/vellorethiruma ... /index.php
http://code.google.com/p/vellorethiruma ... ig.inc.php
User avatar
MindOverBody
Forum Commoner
Posts: 96
Joined: Fri Aug 06, 2010 9:01 pm
Location: Osijek, Croatia

Re: path problem

Post by MindOverBody »

try with $_SERVER['DOCUMENT_ROOT'] . 'application/'
User avatar
axcrow
Forum Newbie
Posts: 9
Joined: Mon Aug 09, 2010 12:22 pm

Re: path problem

Post by axcrow »

set_include_path() might help
Post Reply