Jpgraph的安装与配置使用方法
Jpgraph这个强大的绘图组件能根据用户的需要绘制任意图形。只需要提供数据,就能自动调用绘图函数的过程,把处理的数据输入自动绘制。Jpgraph提供了多种方法创建各种统计图,包括折线图、柱形图和饼形图等。Jpgraph是一个完全使用PHP语言编写的类库,并可以应用在任何PHP环境中。
需要注意的是,如果你在LINUX系统下,字体的路径一定得是系统路径 举例 字体放在 /var/fonts/default/font.ttf 你在使用的时候一定要用这个完整的路径
Jpgraph的安装
Jpgraph可以从其官方网站http://www.aditus.nu/jpgraph/下载。注意Jpgraph支持PHP 4.3.1以上和PHP 5两种版本的图形库,选择合适的Jpgraph下载。目前最新的版本是2.3。
Jpgraph的安装方法非常简单,文件下载后,安装步骤如下:
(1)将压缩包下的全部文件解压到一个文件夹中,如F:AppServwwwjpgraph。
(2)打开PHP的安装目录,编辑php.ini文件并修改其中的include_path参数,在其后增加前面的文件夹名,如include_path = ".;F:AppServwwwjpgraph"。
(3)重新启动Apache服务器即可生效。
注意:Jpgraph需要GD库的支持。如果用户希望Jpgraph类库仅对当前站点有效,只需将Jpgraph压缩包下的src文件夹中的全部文件复制到网站所在目录的文件夹中即可,使用时调用src文件夹下的指定文件即可。这些内容在后面的典型实例中将具体讲解。
Jpgraph的配置
Jpgraph提供了一个专门用于配置Jpgraph类库的文件jpg-config.inc.php。在使用Jpgraph前,可以通过修改文本文件来完成Jpgraph的配置。
jpg-config.inc.php文件的配置需修改以下两项。
支持中文的配置
Jpgraph支持的中文标准字体可以通过修改CHINESE_TTF_FONT的设置来完成。
DEFINE(CHINESE_TTF_FONT,bkai00mp.ttf);默认图片格式的配置
根据当前PHP环境中支持的图片格式来设置默认的生成图片的格式。Jpgraph默认图片格式的配置可以通过修改DEFAULT_GFORMAT的设置来完成。默认值auto表示Jpgraph将依次按照PNG、GIF和JPEG的顺序来检索系统支持的图片格式。DEFINE("DEFAULT_GFORMAT","auto");注意:如果用户使用的为Jpgraph 2.3版本,那么不需要重新进行配置。

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

With the rapid development of social media, Xiaohongshu has become one of the most popular social platforms. Users can create a Xiaohongshu account to show their personal identity and communicate and interact with other users. If you need to find a user’s Xiaohongshu number, you can follow these simple steps. 1. How to use Xiaohongshu account to find users? 1. Open the Xiaohongshu APP, click the "Discover" button in the lower right corner, and then select the "Notes" option. 2. In the note list, find the note posted by the user you want to find. Click to enter the note details page. 3. On the note details page, click the "Follow" button below the user's avatar to enter the user's personal homepage. 4. In the upper right corner of the user's personal homepage, click the three-dot button and select "Personal Information"

In Ubuntu systems, the root user is usually disabled. To activate the root user, you can use the passwd command to set a password and then use the su- command to log in as root. The root user is a user with unrestricted system administrative rights. He has permissions to access and modify files, user management, software installation and removal, and system configuration changes. There are obvious differences between the root user and ordinary users. The root user has the highest authority and broader control rights in the system. The root user can execute important system commands and edit system files, which ordinary users cannot do. In this guide, I'll explore the Ubuntu root user, how to log in as root, and how it differs from a normal user. Notice

Installing Android applications on Linux has always been a concern for many users. Especially for Linux users who like to use Android applications, it is very important to master how to install Android applications on Linux systems. Although running Android applications directly on Linux is not as simple as on the Android platform, by using emulators or third-party tools, we can still happily enjoy Android applications on Linux. The following will introduce how to install Android applications on Linux systems.

Understanding Linux Bashrc: Function, Configuration and Usage In Linux systems, Bashrc (BourneAgainShellruncommands) is a very important configuration file, which contains various commands and settings that are automatically run when the system starts. The Bashrc file is usually located in the user's home directory and is a hidden file. Its function is to customize the Bashshell environment for the user. 1. Bashrc function setting environment

If you have used Docker, you must understand daemons, containers, and their functions. A daemon is a service that runs in the background when a container is already in use in any system. Podman is a free management tool for managing and creating containers without relying on any daemon such as Docker. Therefore, it has advantages in managing containers without the need for long-term backend services. Additionally, Podman does not require root-level permissions to be used. This guide discusses in detail how to install Podman on Ubuntu24. To update the system, we first need to update the system and open the Terminal shell of Ubuntu24. During both installation and upgrade processes, we need to use the command line. a simple

While studying in high school, some students take very clear and accurate notes, taking more notes than others in the same class. For some, note-taking is a hobby, while for others, it is a necessity when they easily forget small information about anything important. Microsoft's NTFS application is particularly useful for students who wish to save important notes beyond regular lectures. In this article, we will describe the installation of Ubuntu applications on Ubuntu24. Updating the Ubuntu System Before installing the Ubuntu installer, on Ubuntu24 we need to ensure that the newly configured system has been updated. We can use the most famous "a" in Ubuntu system

ppt is widely used in many fields and work, especially in education, architecture, etc. When it comes to architectural ppt, we must first think of the presentation of some architectural drawings. If we do not use professional drawing software, can we directly draw a simple architectural plan? In fact, we can complete the operation here. Below, we will draw a relatively simple floor plan to give you an idea. I hope you can complete better floor plan drawings based on this idea. 1. First, we double-click to open the ppt software on the desktop and click to create a new presentation blank document. 2. We find Insert→Shape→Rectangle in the menu bar. 3. After drawing the rectangle, double-click the graphic and modify the fill color type. Here we can modify

The KMS Activation Tool is a software tool used to activate Microsoft Windows and Office products. KMS is the abbreviation of KeyManagementService, which is key management service. The KMS activation tool simulates the functions of the KMS server so that the computer can connect to the virtual KMS server to activate Windows and Office products. The KMS activation tool is small in size and powerful in function. It can be permanently activated with one click. It can activate any version of the window system and any version of Office software without being connected to the Internet. It is currently the most successful and frequently updated Windows activation tool. Today I will introduce it Let me introduce to you the kms activation work
