A little hint of PHP jpgraph (installation method attached)
Source: Internet
Author: User
The GD library in PHP itself is a set of very powerful drawing library, the image of the basic can be used to meet the daily requirements, but powerful regulation is strong, or not convenient Kazakhstan, because the powerful and convenient based on the GD library of the Jpgraph is also born! PHP does not enable the GD library by default because you need to open the Extension=php_gd2.dll annotation in the php.ini configuration file. Once you've opened it, you can draw some of the wonderful patterns you want to draw. What the? Can't draw? Then go back to learning the basics! Today looked at a training organization video, read the Jpgraph report this piece, according to the video method, in http://jpgraph.net/download/downloaded version:3.0.7 version, After decompression, create a jpgraph directory under the examples directory and cut all files except examples in the SRC directory to the Jpgraph directory just created in the examples directory. Then copy the examples to the directory configured by Apache. But the result tried half a day, the old error: Warning:strftime (): It is not safe to rely on the system's timezone settings. You are are *required* to use the Date.timezone setting or the Date_default_timezone_set () function. In case you are used any of those methods and your are still getting this warning, for you most likely misspelled the timezone Iden Tifier. We selected the timezone ' UTC ' for now, but the "please" set Date.timezone to select your timezone. In H:\TestFile\Examples\jpgraph\jpgraph.php on line 391 Jpgraph error:http headers have already been. caused by output from file jpgraph.php in 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 headers to this browser. This is the makes it impossible for the "library to" send back image of the browser (since that would is 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 the browser the browser'll assume the all data is plain text. Look for the all text, even spaces and newlines, that might have been the sent. For example it are a common mistake to leave a blank line before the opening "<?php". Above the warning reported a pile, there was a mistake: jpgraph error, and then, English bad bloggers simply will this pile of English to Baidu translation, simply still did not understand, online find a bunch is no answer, After Google search to find. Http://bbs.php100.com/simple/?t294044.html, the answer is probably the time zone what the problem is, also gives the solution with Date_default_timezone_set (' asia/chongqing ' Setting the corresponding time zone, which is set up in Chongqing. The problem is solved. withAfter downloading the version:3.5.0b1 of the Jpgraph, the same method to try, the first page of the picture is still not loaded, because there is no ' jpgraph/jpgraph_odo.php ' this file, leading to the introduction of the problem, And the blogger to the Internet to search the corresponding documents also copied to the Jpgraph directory, also still failed to resolve, finally nothing.
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