實際上我需要在應用程序中將整數轉化爲單詞,並且我遇到了梨的使用,但我似乎並不明白他們到底想要什麼做是因爲我得到的信息(http://www.techrepublic.com/article/converting-numbers-to-words-in-php/)假定它已經在我的電腦中設置。所以,請我需要一份關於如何在我的服務器中設置的清晰指南。我運行WAMP(Apache版本2.4.4/Php版本5.4.16)。想知道我的PEAR應該安裝在哪裏以及它的位置
回答
如何在WAMPServer PHP版本
安裝PEAR創建一個名爲包含要PEAR擴展安裝到PHP版本的文件夾下的PEAR新的文件夾。例如c:\wamp\bin\php\php.x.y.z\PEAR
(我喜歡這裏一個大寫的名字,但它並沒有被這種方式)
如果go-pear.phar
不在php.x.y.z
文件夾中存在的文件,從http://pear.php.net/go-pear.phar
得到去-pear.phar,並將其保存到php.x.y.z
文件夾,您正在使用並希望下載到的版本。
然後,你必須確保你對Windows路徑下的php.exe文件 我們不想permanantly做到這一點,因爲這將陷入困境WAMPServers一鍵這樣的點擊切換PHP版本的能力忽略任何你可能看到的建議,把它放在你實際的Windows PATH環境變量上。
命令行所以做這一點:
path=%path%;c:\wamp\bin\php\phpx.y.z
(change x and y and z to the version numbers of your PHP)
另外,我用一個批處理文件,我保存成已經是我的windows路徑上的一個文件夾,讓我們稱之爲phppath.bat和我添加這是文件
path=%path%;c:\wamp\bin\php\phpx.y.z;
php -v
然後就可以開始你喜歡的命令窗口隨時,只是KEYIN> phppath和我訪問任何文件夾中的php.exe我不妨編寫和運行一些PHP CLI源碼。
現在從命令窗口確保您在wamp\bin\php\phpx.y.z
然後KEYIN
CD \wamp\bin\php\php5.4.11
php go-pear.phar
Are you installing a system-wide PEAR or a local copy?
(system|local) [system] : l
Please confirm local copy by typing 'yes' : yes
Below is a suggested file layout for your new PEAR installation. To
change individual locations, type the number in front of the
directory. Type 'all' to change all of them or simply press Enter to
accept these locations.
1. Installation base ($prefix) : c:\wamp\bin\php\php5.4.11
2. Temporary directory for processing : c:\wamp\bin\php\php5.4.11\tmp
3. Temporary directory for downloads : c:\wamp\bin\php\php5.4.11\tmp
4. Binaries directory : c:\wamp\bin\php\php5.4.11
5. PHP code directory ($php_dir) : c:\wamp\bin\php\php5.4.11\pear
6. Documentation directory : c:\wamp\bin\php\php5.4.11\docs
7. Data directory : c:\wamp\bin\php\php5.4.11\data
8. User-modifiable configuration files directory : c:\wamp\bin\php\php5.4.11\cfg
9. Public Web Files directory : c:\wamp\bin\php\php5.4.11\www
10. Tests directory : c:\wamp\bin\php\php5.4.11\tests
11. Name of configuration file : c:\wamp\bin\php\php5.4.11\pear.ini
12. Path to CLI php.exe : c:\wamp\bin\php\php5.4.11
1-12, 'all' or Enter to continue:
Beginning install...
Configuration written to D:\wamp\bin\php\php5.4.11\pear.ini...
Initialized registry...
Preparing to install...
installing phar://c:/wamp/bin/php/php5.4.11/PEAR/go-pear.phar/PEAR/go-pear-tarballs/Archive_Tar-1.3.7.tar...
installing phar://c:/wamp/bin/php/php5.4.11/PEAR/go-pear.phar/PEAR/go-pear-tarballs/Console_Getopt-1.3.0.tar...
installing phar://c:/wamp/bin/php/php5.4.11/PEAR/go-pear.phar/PEAR/go-pear-tarballs/PEAR-1.9.4.tar...
installing phar://c:/wamp/bin/php/php5.4.11/PEAR/go-pear.phar/PEAR/go-pear-tarballs/Structures_Graph-1.0.4.tar...
installing phar://c:/wamp/bin/php/php5.4.11/PEAR/go-pear.phar/PEAR/go-pear-tarballs/XML_Util-1.2.1.tar...
install ok: channel://pear.php.net/Archive_Tar-1.3.7
install ok: channel://pear.php.net/Console_Getopt-1.3.0
install ok: channel://pear.php.net/Structures_Graph-1.0.4
install ok: channel://pear.php.net/XML_Util-1.2.1
install ok: channel://pear.php.net/PEAR-1.9.4
PEAR: Optional feature webinstaller available (PEAR's web-based installer)
PEAR: Optional feature gtkinstaller available (PEAR's PHP-GTK-based installer)
PEAR: Optional feature gtk2installer available (PEAR's PHP-GTK2-based installer)
PEAR: To install optional features use "pear install pear/PEAR#featurename"
******************************************************************************
WARNING! The include_path defined in the currently used php.ini does not
contain the PEAR PHP directory you just specified:
<c:\wamp\bin\php\php5.4.11\pear>
If the specified directory is also not in the include_path used by
your scripts, you will have problems getting any PEAR packages working.
Would you like to alter php.ini <c:\wamp\bin\php\php5.4.11\php.ini>? [Y/n] : n
Please look over your php.ini file to make sure
c:\wamp\bin\php\php5.4.11\pear is in your include_path.
Current include path : .;c:\wamp\bin\php\php5.4.11\PEAR
Configured directory : c:\wamp\bin\php\php5.4.11\pear
Currently used php.ini (guess) : c:\wamp\bin\php\php5.4.11\php.ini
Press Enter to continue:
** WARNING! Old version found at c:\wamp\bin\php\php5.4.11, please remove it or be sure to use the new c:\wamp\bin\php\php5.4.11\pear.bat command
在 '梨' 命令現在爲您服務,在C:\ WAMP \ BIN \ PHP \ php5.4.11 \梨.BAT
測試,即WORKS
>pear
應該表現出你的東西這樣
C:\wamp\bin\php\php5.4.11>pear
Commands:
build Build an Extension From C Source
bundle Unpacks a Pecl Package
channel-add Add a Channel
channel-alias Specify an alias to a channel name
channel-delete Remove a Channel From the List
channel-discover Initialize a Channel from its server
channel-info Retrieve Information on a Channel
channel-login Connects and authenticates to remote channel server
channel-logout Logs out from the remote channel server
channel-update Update an Existing Channel
clear-cache Clear Web Services Cache
config-create Create a Default configuration file
config-get Show One Setting
config-help Show Information About Setting
config-set Change Setting
config-show Show All Settings
convert Convert a package.xml 1.0 to package.xml 2.0 format
cvsdiff Run a "cvs diff" for all files in a package
cvstag Set CVS Release Tag
download Download Package
download-all Downloads each available package from the default channel
info Display information about a package
install Install Package
list List Installed Packages In The Default Channel
list-all List All Packages
list-channels List Available Channels
list-files List Files In Installed Package
list-upgrades List Available Upgrades
login Connects and authenticates to remote server [Deprecated in favor of channel-login]
logout Logs out from the remote server [Deprecated in favor of channel-logout]
makerpm Builds an RPM spec file from a PEAR package
package Build Package
package-dependencies Show package dependencies
package-validate Validate Package Consistency
pickle Build PECL Package
remote-info Information About Remote Packages
remote-list List Remote Packages
run-scripts Run Post-Install Scripts bundled with a package
run-tests Run Regression Tests
search Search remote package database
shell-test Shell Script Test
sign Sign a package distribution file
svntag Set SVN Release Tag
uninstall Un-install Package
update-channels Update the Channel List
upgrade Upgrade Package
upgrade-all Upgrade All Packages [Deprecated in favor of calling upgrade with no parameters]
Usage: pear [options] command [command-options] <parameters>
Type "pear help options" to list all options.
Type "pear help shortcuts" to list all command shortcuts.
Type "pear help <command>" to get the help for the specified command.
C:\wamp\bin\php\php5.4.11>pear list-channels
REGISTERED CHANNELS:
====================
CHANNEL ALIAS SUMMARY
doc.php.net phpdocs PHP Documentation Team
pear.php.net pear PHP Extension and Application
Repository
pecl.php.net pecl PHP Extension Community Library
__uri __uri Pseudo-channel for static packages
請參閱我的php.ini包括並告訴我,如果我這樣做是正確 –
的include_path =「C:\ PHP \包括; c:\ wamp \ bin \ php \ php5.5.12 \ pear \ PEAR「 –
通常情況下,如果您使用的是WAMPServer,那麼一切都應該放在'\ wamp \ .....'的某處不知道爲什麼你有'C: \ php \ include'在那裏 – RiggsFolly
- 1. 應該在哪裏安裝節點以及如何設置PATH?
- 2. System.AddIn管道應該安裝在哪裏?
- 3. PEAR安裝位置?
- 4. 我應該在哪裏安裝node.js?
- 5. 安裝後我應該在哪裏放置我的rubygems?
- 6. Java不知道在哪裏可以找到.csv文件,我應該在哪裏放置它?
- 7. 不知道在哪裏安裝模塊
- 8. PEAR包通常安裝在哪裏?
- 9. Angular-cli的安裝位置在哪裏?
- 10. 不知道我在哪裏安裝了這樣的軟件包
- 11. 我在哪裏以及如何安裝twitter的Python API?
- 12. 我應該在哪裏安裝我的Continuous Integration Server?
- 13. python pip應該安裝在哪裏?
- 14. 應該在哪裏安裝python wrapper/package
- 15. 我應該下載哪個CakePHP版本以及將它放在哪裏?
- 16. 在Ubuntu上新安裝gvim。我應該在哪裏放置我的插件?
- 17. 想知道是否安裝了mysql以及如何使用sqlyog連接它?
- 18. 我想知道我的計算錯誤在哪裏! :(
- 19. Perl模塊是否知道它的安裝位置?
- 20. 我如何知道`yo`從哪裏跑?如何指定它運行的位置?
- 21. 我可以在哪裏「安裝」?
- 22. 我應該在哪裏存儲CSS文件在SharePoint安裝?
- 23. 我想在我的Mac上安裝Perforce P4,不知道在哪裏停止二進制
- 24. ParentViewController正在成爲零,不知道在哪裏以及如何
- 25. 我應該在哪裏放置在FBConnect
- 26. 我應該在哪裏放置在phabricator
- 27. 我在哪裏安裝SSRS?
- 28. 用於php安裝的Gmagick擴展 - 如何以及在哪裏?
- 29. 我應該在哪裏安裝開發工具?
- 30. 我應該在哪裏安裝elgg社交登錄插件?
http://pear.php.net/manual/en/installation.php – cweiske