PEAR教程(一)--Pear的介绍和安装
首先请大家打开这个链接http://pear.php.net/manual/en/我们来看看PEAR到底是什么东西,点击Chapter 1. Introduction。 PEAR is short for “PHP Extension and Application Repository” andis pronounced just like the fruit. The purpose of PEAR is toprovide:Pear是”PHP Extension and ApplicationRepository”的缩写,发音和英语单词“梨”一样,所以你看到这个网站的标志就是一个梨子。 * A structured library of open-source code for PHP users所有php开发者都可以使用的开源代码的库 读者要求:1.会搭建WAMP(window+apache+mysql+php)服务器。2.会简单的php3.愿意使用PEAR 下面介绍一下PEAR的安装(这个很重要): 首先说说php的include的路径问题,这个和java的classpath比较类似,有默认的path,比如说php.ini设置了几个默认的路径/etc/include或者 /etc/DEMO,那么在php的代码中,如果有类似“include‘file.php’;”的包含语句,程序执行的时候就会在当前文件夹下搜索是否有file.php这个文件,如果没有,再去搜索/etc/include或者 /etc/DEMO文件夹下是否有这个文件,如果依然没有,则报错! 对于国外的虚拟主机,很多都安装了PEAR的,而且安装的PEAR package都很齐全,所以你在php文件中引用 include“PEAR.php”,程序就会根据php.ini找到PEAR的路径而引用进来,但是如果虚拟主机未安装PEAR,就得我们自己安装了。 安装PEAR是一个很简单的过程,大可不必害怕,下面还是引导大家去看帮助手册,链接在这里(由于很多人弄不清楚PEAR的文件结构,所以这个manual被删除了),不过没有关系,可以去这个链接看看。可能很少有人有耐心看下去,反正我是看不下去的,其实最关键的就是这一行,那就是告诉你添加php的默认include路径的方法 好了,开始介绍安装步骤吧: 首先在网站的根目录下建议文件夹“tutor”,然后建立一个文件夹inc,下载PEAR,目前最新版的下载地址是http://download.pear.php.net/package/PEAR-1.6.1.tgz。
* A system for code distribution and package maintenance是一个代码分发的打包系统
* A standard style for code written in PHP, specifiedhere是一个php代码格式的标准
* The PHP Extension Community Library (PECL), see morebelow是一个PECL的库
…
一句话,PEAR就是一个强大的php库,我的bloggermap也是使用的这个库,而且这个库的package很齐全,包括数据库、表单的生成、缓存应有尽有,后面我会逐步的给大家介绍。
下载完毕解压缩,将PEAR放在inc目录下,展开的目录如图:;
includedefine,].define,WEB_DIR.//PEAR目录的路径
, PEAR_DIR .PATH_SEPARATOR .?>
再次打开http://127.0.0.1/tutor/demo.php,发现什么样?错误消失了!
至此,PEAR安装结束

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

After rain in summer, you can often see a beautiful and magical special weather scene - rainbow. This is also a rare scene that can be encountered in photography, and it is very photogenic. There are several conditions for a rainbow to appear: first, there are enough water droplets in the air, and second, the sun shines at a low angle. Therefore, it is easiest to see a rainbow in the afternoon after the rain has cleared up. However, the formation of a rainbow is greatly affected by weather, light and other conditions, so it generally only lasts for a short period of time, and the best viewing and shooting time is even shorter. So when you encounter a rainbow, how can you properly record it and photograph it with quality? 1. Look for rainbows. In addition to the conditions mentioned above, rainbows usually appear in the direction of sunlight, that is, if the sun shines from west to east, rainbows are more likely to appear in the east.

PHP Tutorial: How to Convert Int Type to String In PHP, converting integer data to string is a common operation. This tutorial will introduce how to use PHP's built-in functions to convert the int type to a string, while providing specific code examples. Use cast: In PHP, you can use cast to convert integer data into a string. This method is very simple. You only need to add (string) before the integer data to convert it into a string. Below is a simple sample code

Essential PHP programs: Install these to run smoothly! PHP is a popular server-side scripting language that is widely used to develop web applications. To successfully run a PHP program, you first need to install some necessary software and tools on the server. In this article, we will introduce the software and tools that must be installed, along with specific code examples to help you run PHP programs smoothly. 1. PHP interpreter The core of the PHP program is the PHP interpreter, which is responsible for parsing and executing PHP code. To install the PHP interpreter, you can follow

How to implement HTTP streaming in C++? Create an SSL stream socket using Boost.Asio and the asiohttps client library. Connect to the server and send an HTTP request. Receive HTTP response headers and print them. Receives the HTTP response body and prints it.

2024 is the first year of AI mobile phones. More and more mobile phones integrate multiple AI functions. Empowered by AI smart technology, our mobile phones can be used more efficiently and conveniently. Recently, the Galaxy S24 series released at the beginning of the year has once again improved its generative AI experience. Let’s take a look at the detailed function introduction below. 1. Generative AI deeply empowers Samsung Galaxy S24 series, which is empowered by Galaxy AI and brings many intelligent applications. These functions are deeply integrated with Samsung One UI6.1, allowing users to have a convenient intelligent experience at any time, significantly improving the performance of mobile phones. Efficiency and convenience of use. The instant search function pioneered by the Galaxy S24 series is one of the highlights. Users only need to press and hold

The expansion of the virtual market is inseparable from the circulation of virtual currency, and naturally it is also inseparable from the issue of virtual currency transfers. A common transfer error is the address copy error, and another error is the chain selection error. The transfer of virtual currency to the wrong chain is still a thorny problem, but due to the inexperience of transfer operations, novices often transfer the wrong chain. So how to recover the wrong chain of virtual currency? The wrong link can be retrieved through a third-party platform, but it may not be successful. Next, the editor will tell you in detail to help you better take care of your virtual assets. How to retrieve the wrong chain of virtual currency? The process of retrieving virtual currency transferred to the wrong chain may be complicated and challenging, but by confirming the transfer details, contacting the exchange or wallet provider, importing the private key to a compatible wallet, and using the cross-chain bridge tool

How to download 360 Secure Browser on your computer? It is a very secure web browser software. This browser is very rich in functions and very simple to operate. Using 360 Secure Browser to browse the web can protect user privacy and security very well. Many people like to use this browser. Browser office, but many people still don’t know how to download and install 360 Secure Browser on their computers. This article will give you a detailed introduction to the installation process of the 360 Safe Browser PC version, hoping to help you solve the problem. Overview of the installation process under the computer version of 360 Secure Browser 1. On the computer’s main page, find “360 Software Manager” and enter (as shown in the picture). 2. Open 360 Software Manager and find the search box (as shown in the picture). 3. Click Search

PHPFFmpeg Extension Installation Guide: Simple and easy-to-understand tutorial In the process of website development, sometimes we need to process various multimedia files, such as audio, video, etc. FFmpeg is a powerful multimedia processing tool that can process audio, video and other formats, and supports various transcoding, cutting and other operations. The PHPFFmpeg extension is an extension library that calls FFmpeg functions in PHP. It can be used to process multimedia files easily. Below we will introduce PHPF in detail
