有些cp面板的空间会在每个网页头部和页脚增加两个调用的文件,导致zblogPHP安装出错:(8) Undefined offset: 6

主要国外的主机中PHP配置文件两个选项auto_prepend_file和auto_append_file出了问题,他们默认绑定了【/usr/lib/php/head.php】、【/usr/lib/php/footer.php】这两个文件,这一点我们可以从调试模式中的引用文件可以得到印证

解决方法:

(1) 我们虽然没有权限修改主机商的php配置文件,但我们可以在.htaccess里下手脚,来修改auto_prepend_file和auto_append_file;

(2) 首先空间FTP,在本地新建TXT文本文件,在里面加入以下两行代码,然后保存 (username = 主机商给你取的用户名)

php_value auto_prepend_file "/home/username/public_html/header.php" 
php_value auto_append_file "/home/username/public_html/footer.php"

(3) 在本地新建“header.php”和“footer.php”两个空文件,同以上保存TXT文本文件一起上传到你的FTP根目录

(4) 将TXT文本文件改名为“.htaccess”,就大功告成了。(windows缺陷,无法在本地新建没有文件名的文件类型,只能是FTP里改名)

Z-BlogPHP 安装出现 (8) Undefined offset: 6 解决方法的更多相关文章

  1. Notice: Undefined offset 的解决方法

    Notice: Undefined offset: 1 in D:\wwwroot\wr\askseo\404.php on line 5 Notice: Undefined offset: 2 in ...

  2. LaTex: Undefined citation warnings 解决方法

    参考 Undefined citations LaTex: Undefined citation warnings 解决方法 在使用TexMaker编译文献的时候,出现引用参考文献的问题: Packa ...

  3. [转载][jQuery] Cannot read property ‘msie’ of undefined错误的解决方法

    参考 [jQuery] Cannot read property ‘msie’ of undefined错误的解决方法 ---------------------------------------- ...

  4. [jQuery1.9]Cannot read property ‘msie’ of undefined错误的解决方法

    原文:[jQuery1.9]Cannot read property 'msie' of undefined错误的解决方法 $.browser在jQuery1.9里被删除了,所以项目的js代码里用到$ ...

  5. 在CentOS7.1上安装Gitlab碰到的问题及解决方法

    一 前言 关于在CentOS7上安装Gitlab, 官方文档已经很详细了,步骤大家按照官方的安装文档一步一步安装即可, 这里就不在累述.官方安装文档地址:  https://about.gitlab. ...

  6. ASP.NET MVC 此安装不支持该项目类型解决方法

    http://www.cnblogs.com/younggun/archive/2011/03/03/1969498.html ASP.NET MVC  此安装不支持该项目类型解决方法 打开 .csp ...

  7. win7系统总是安装不了net2.0的解决方法

    一些网友询问说ghost win7系统总是安装不了net2.0怎么办呢?net2.0是什么?ATI显卡的控制中心 就需要在NET2.0的基础上.可是一些用户说win7系统总是安装不了net2.0如何解 ...

  8. Linux下Python3.5使用pyqt5.11报错 ImportError: /usr/local/lib/python3.5/dist-packages/PyQt5/QtCore.so: undefined symbol: PySlice_AdjustIndices 解决方法

    我用的Linux自带的是Python3.5版本,运行pip3 install PyQt5, 下载的是PyQt5.11,运行PyQt5程序会报错: ImportError: /usr/local/lib ...

  9. mysql安装以后无法登陆的的解决方法((ERROR 1698 (28000): Access denied for user 'root'@'localhost'))

    mysql安装以后无法登陆的的解决方法((ERROR 1698 (28000): Access denied for user 'root'@'localhost')) 解决步骤: [====> ...

随机推荐

  1. Burn the Linked Camp(bellman 差分约束系统)

    Burn the Linked Camp Time Limit: 2 Seconds      Memory Limit: 65536 KB It is well known that, in the ...

  2. 通用链表实现(参考Linux List)

    最近参考Linux实现的通用双向链表时,因typeof并不是标准c规定的关键字,除GCC编译器外其他编译器未必支持typeof关键字,所以在使用上并不能想Linux所实现的链表哪样灵活,它要求将连接器 ...

  3. setsockopt

    1.closesocket(一般不会立即关闭而经历TIME_WAIT的过程)后想继续重用该socket:BOOL bReuseaddr=TRUE;setsockopt(s,SOL_SOCKET ,SO ...

  4. 【阿里云产品公测】rds测试感受

    阿里云用户:cncbase 公司于10.1决定改变原来的服务器自建数据库,使用rds.于近日开通rds,进行了一些测试. 信息量:500字节左右每条信息,约200万条信息/小时的吞吐量.     信息 ...

  5. Providers、Controller 、Service、DirectiveFactory

    Providers 是唯一一种你可以传进 .config() 函数的 service.当你想要在 service 对象启用之前,先进行模块范围的配置,那就应该用 provider Controller ...

  6. JQuery事件与应用(一)

    来源:http://www.imooc.com/learn/11     jQuery基础课程 一.使用bind()方法绑定元素的事件 功能: 在ready()事件中绑定一个按钮的单击事件,使用bin ...

  7. 多线程的练习----妖,等待唤醒,代码重构,lock到condition

    × 目录 [1]需求 [2]妖的出现和解决 [3]等待唤醒 [4]代码重构 [5]改成Lock Condition ------------------------------------- 1,需求 ...

  8. Table of Contents - MongoDB

    Getting Started Installation Installing MongoDB on Windows Installing MongoDB on Linux Introduction ...

  9. CS异步下载

    using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin ...

  10. PAT1014——福尔摩斯的约会

    大侦探福尔摩斯接到一张奇怪的字条:“我们约会吧! 3485djDkxh4hhGE 2984akDfkkkkggEdsb s&hgsfdk d&Hyscvnm”.大侦探很快就明白了,字条 ...