PHP jpgraph的一点小提示和方法
PHP默认是不启用GD库的,因为需要在php.ini的配置文件中将extension=php_gd2.dll注释打开。打开后你就可以画一些你想画的各种奇葩图案了。什么?不会画?那回去学基础!
今天看了一下某培训机构的视频,看了jpgraph报表这块儿,按照视频方法,在http://jpgraph.net/download/上下载了Version: 3.0.7版本,解压后在Examples目录下创建一个jpgraph目录,并将src目录下的除开Examples的所有文件剪切到Examples目录下刚创建的jpgraph目录内。然后把Examples拷贝到apache所配置的目录即可。
可是结果试了半天,老报错:
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 your timezone. in H:\TestFile\Examples\jpgraph\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 back image data to the browser (since that would 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 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 is a common mistake to leave a blank line before the opening "<?php".
上面的Warning报了一堆后,出现了一个错误:JpGraph
Error,于是乎,英文不好的博主索性将这堆英文拉到百度翻译去,索性还是没看懂,网上找了一堆也是无人答之,后在Google下搜一下才找到。http://bbs.php100.com/simple/?t294044.html
,答案大概就是时区什么什么问题的,也给出了解决方案用date_default_timezone_set('Asia/Chongqing');设置对应的时区即可,这里设置成了重庆。问题也就随之解决了。
PHP jpgraph的一点小提示和方法的更多相关文章
- PHP jpgraph的一点小提示(附安装方法)
PHP中的GD库本身是一套很强大的绘图库了,绘制的图像基本可以满足日常要求,但强大规强大,还是不够方便哈,因为强大方便的基于PHP的GD库的jpgraph也就诞生啦! PHP默认是不启用GD库的,因为 ...
- 关于PHP魔术方法__call的一点小发现
好久没有上博客园写文章了,今晚终于有点空了,就来写一下昨天的一点小发现. 我自己所知,C++,Java的面向对象都有多态的特点,而PHP没有,但PHP可以通过继承链方法的重写来实现多态的属性.而魔术方 ...
- easyui toopTip,鼠标划过悬浮,显示一个小提示框的方法
easyui toopTip,鼠标划过悬浮,显示一个小提示框的方法 /*easyui,鼠标划过悬浮,显示一个小提示框的方法*/ function toopTip(idOrClass,showText) ...
- 游戏Loading中的小提示和Loading动画实现
学习unity1年多了,工作也1年了,因为工作需要,有几个月没接触unity Ngui啦. 学的还是不踏实.继续努力吧.由于下周就要进行新游戏的开发,这几天熟悉熟悉NGUI,今天按照现在公司以前的项目 ...
- 关于win8开发的一点小总结
我今天做画面的时候,发现了一点小问题. 我在xmal文件里面加了一个CheckBox控件,设置IsChecked属性为True,并添加了Checked事件.Checked事件里面有对另外一个TextB ...
- Webcast / 技术小视频制作方法——自己动手录制video轻松搞定
Webcast / 技术小视频制作方法——自己动手录制video轻松搞定 http://blog.sina.com.cn/s/blog_67d387490100wdnh.html 最近申请加入MSP的 ...
- 几个 jQuery 小提示和技巧
几个 jQuery 小提示和技巧 今天,我们将分享一些很有用的技巧和窍门给 jQuery 开发人员.jQuery 是最好的 JavaScript 库之一,用于简化动画,事件处理,支持 Ajax 和 H ...
- MySQL (五)--连接查询简介、 交叉连接、 内连接、外连接、自然连接、温馨小提示
1 连接查询简介 将多张表(可以大于2)进行记录的连接(按照某个指定的条件进行数据拼接). 最终结果:记录数可能会有变化,字段书一定会增加(至少两张表的合并). 连接查询:join,使用方式:左表 j ...
- Win10如何彻底禁用小娜?彻底禁用小娜的方法
原文地址:https://www.cnblogs.com/zhuimengle/p/5949152.html 小娜是Win10系统中的一款强大功能,有了它,我们对电脑的操作将更加方便.Win10系统有 ...
随机推荐
- java_List接口
/** * java.util.list接口 extends Collection接口 * 1.有序的集合 * 2.有索引 * 3.元素可以重复 * * List中带索引的方法: *add:添加 * ...
- 输出内容 document.write() 可用于直接向 HTML 输出流写内容。简单的说就是直接在网页中输出内容
输出内容(document.write) document.write() 可用于直接向 HTML 输出流写内容.简单的说就是直接在网页中输出内容. 第一种:输出内容用""括起,直 ...
- python csv write 乱码
参考 : https://www.zhihu.com/question/34201726 1.使用utf_8_sig with open('d:/file.csv', 'w', encoding='u ...
- 使用fileupload实现文件上传
一. fileupload组件工作原理 先来张图片, 帮助大家理解 fileupload核心API 1. DiskFileItemFactory构造器1) DiskFileItemFactory() ...
- leetcode-105-从前序与中序遍历构造二叉树
题目描述: 方法一: # Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.va ...
- configparser 配置文件模块
#_author:star#date:2019/11/7# configparser 配置文件模块import configparserconfig=configparser.ConfigParser ...
- pytorch基础2
下面是常见函数的代码例子 import torch import numpy as np print("分割线---------------------------------------- ...
- Joomla - K2组件(文章管理扩展)
一.下载 K2 进入 https://getk2.org/ ,点击DOWNLOAD K2 下载K2 下载完毕得到一个安装包 二.安装 K2 进入看后台,点击顶栏主菜单 扩展管理 -> 扩展安装 ...
- springboot thymeleaf ----服务端渲染html
一. 引用命名空间 <html xmlns:th="http://www.thymeleaf.org"> 不这么写 html标签没闭合会报错 二.实际内容在../sta ...
- PAT甲级——A1092 To Buy or Not to Buy【20】
Eva would like to make a string of beads with her favorite colors so she went to a small shop to buy ...