A small prompt on PHP jpgraph (with installation method)

Source: Internet
Author: User

A small prompt on PHP jpgraph (with installation method)
The GD library in PHP is a very powerful Drawing Library, and the drawing images can basically meet daily requirements. However, it is not convenient to use the powerful library, the jpgraph of the powerful and convenient PHP-based GD library is born! PHP does not enable the GD library by default, because you need to comment out extension = php_gd2.dll in the configuration file of php. ini. After opening it, you can draw some amazing patterns you want to draw. What? No painting? Go back and learn the basics! Today, I watched a video from a training institution and read the jpgraph report. According to the video method, I downloaded version: 3.0.7 at http://jpgraph.net/download/, decompress it, and create a jpgraph directory under the Examples directory, cut all Examples files under the src directory to the jpgraph directory just created under the Examples directory. Copy Examples to the directory configured by apache. However, after trying for half a day, the old error is: Warning: strftime (): It is not safe to rely on the system's timezone settings. you are * required * to use the date. timezone setting or the date_default_timezone_set () function. in case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. we selected the timezone 'utc' for now, but please set date. timezone to select y Our timezone. in H: \ TestFile \ Examples \ jpgraph. php on line 391 JpGraph Error: HTTP headers have already been sent. caused by output from file jpgraph. php at line 392. explanation: HTTP headers have already been sent back to the browser indicating the data as text before the library got a chance to send it's image HTTP header to this browser. this makes it impossible for the library to send bac K image data to the browser (since that wocould be interpretated as text by the browser and show up as junk text ). most likely you have some text in your script before the call to Graph: Stroke (). if this texts gets sent back to the browser will assume that all data is plain text. look for any text, even spaces and newlines, that might have been sent back to the browser. for example it I S a common mistake to leave a blank line before the opening "<? Php ". the above Warning reported a bunch of errors: JpGraph Error. As a result, the bloggers who are not good at English simply pulled the heap of English into Baidu translation, no one answered a bunch of questions on the Internet, but they were found only after Google's search. Http://bbs.php100.com/simple? T294044.html. The answer is probably the question about the time zone. It also provides the solution to use date_default_timezone_set ('Asia/chongqing'). Set the corresponding time zone to Chongqing. The problem is solved. Then we downloaded the jpgraph of Version: 3.5.0b1. We tried the same method and we still couldn't load the pictures on the homepage because there was no 'jpgraph/jpgraph_odo.php 'file, as a result, there was a problem during the introduction, and the blogger found the corresponding files on the Internet and copied them to the jpgraph directory, which still failed to be solved.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.