Basic Q: Standard Installation Location for PHP Libraries

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
xpt
Forum Newbie
Posts: 23
Joined: Tue Feb 20, 2007 1:00 pm

Basic Q: Standard Installation Location for PHP Libraries

Post by xpt »

Hi,

Very basic question, are there any standard places to install PHP Libraries? I.e., like Unix commands, as long as you put it under certain paths, you won't need to refer them by full path.

I have a PHP Library, Swift Mailer, where should I install it so that I can refer it without the full path, as the user manual says:

Code: Select all

require_once "lib/Swift.php";
Currently, I have to do:

Code: Select all

require_once "/usr/lib/php/swift-lib/Swift.php";
please help.

thx
Citizen
Forum Contributor
Posts: 300
Joined: Wed Jul 20, 2005 10:23 am

Post by Citizen »

I would say look here:

viewtopic.php?t=24660

But the link in that is broken... maybe you can wayback it?
xpt
Forum Newbie
Posts: 23
Joined: Tue Feb 20, 2007 1:00 pm

Post by xpt »

thx for the point, but no, I can't wayback it...
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Anything that's in the include path doesn't require full paths.

get_include_path()
Post Reply