开发者

What is difference between php include_path Local Value and Master Value?

I am trying to use PEAR classses.

When i check phpinfopear path is in master value , but not in Local value. What is the difference?

How can i check pear is enabled or not?

In php 5.3 Phar and pear are same or not?

If any one can provide a very simple program to check that am able to include pear class and wo开发者_如何学编程rking fine will be great


PHAR (PHP archive) is only a way to deploy php application in an archived form. PEAR (PHP Extension and Application Repository) doesn't have anything to do with that.

The master value is the one that is set in php.ini whereas the local value can come from your vhost config, .user.ini (in PHP 5.3) or even be set by your own script using ini_set.


PEAR classes are plain PHP code and you don't need to install anything in order to use them. PEAR provides a command line installer that takes care of downloading all required stuff, dependencies and all, but it's basically a commodity.

I assume that you want to add your PEAR directory to the include_path directive so PEAR code actually works (PEAR makes heavy use of it when including files). You can do so with the set_include_path() function. If you run phpinfo() to see current values, you should see the system-wide default value in the Master column and your local changes in the Local column.

As about PHAR, it's an archive format to pack PHP code.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜