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');设置对应的时区即可,这里设置成了重庆。问题也就随之解决了。

最新文章

  1. 总结:视频播放的四种实现方案(Native)
  2. 剑指Offer41 反转单词顺序,单词字符顺序不变
  3. java新手笔记27 监听器类
  4. opencv学习笔记(02)——遍历图像(指针法)
  5. JavaScript高级程序设计30.pdf
  6. ubuntu忘记登录账户以及密码
  7. Linux的正常关机
  8. Xcode8中添加SnapKit框架报错,编译失败
  9. 2017年05月10日记一次微项目投产 | 安卓版微信内置浏览器不能解析gzip压缩过的mp4视频的问题
  10. 读取指定excel,修改并某个值并另存到指定路径
  11. ORA-279 signalled during: alter database recover logfile
  12. psutil的几个例子
  13. centos 终端字体错位个别字母中间有间隔的解决
  14. Python丢弃返回值
  15. 使用Python启动一个简单的服务器
  16. 高性能Nginx服务器-负载均衡
  17. 20155310 《网络对抗》Exp 8 Web基础
  18. python第八课——random模块的使用
  19. Oracle手工生成段建议(Segment Advisor)
  20. mac和linux下sed使用的不同

热门文章

  1. 18-3-bind
  2. js 实现vue—引入子组件props传参
  3. 自定义Jquery:ajax,get,post方法
  4. CSS选择器及优先级
  5. QVaraint类
  6. Python全栈开发:web框架们
  7. iOS之UITableView加载网络图片cell自适应高度
  8. Cooki and Session
  9. HDU--2126 Buy the souvenirs(二维01背包)
  10. Neo4j删除节点和关系、彻底删除节点标签名