Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/url/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Joomla安装/卸载程序包中的SQL文件位置_Joomla_Joomla Extensions - Fatal编程技术网

Joomla安装/卸载程序包中的SQL文件位置

Joomla安装/卸载程序包中的SQL文件位置,joomla,joomla-extensions,Joomla,Joomla Extensions,我正在构建一个Joomla包,其中包含一个组件、多个模块和一个插件 我的问题是,相对于包根目录,我应该将install.sql和uninstall.sql文件放在哪里?现在它们位于root/com\u mypackage/administrator/sql/install.mysql.utf8.sql,它们在组件的清单中定义为: <install><!-- Runs on install --> <sql> <file driver=

我正在构建一个Joomla包,其中包含一个组件、多个模块和一个插件

我的问题是,相对于包根目录,我应该将install.sql和uninstall.sql文件放在哪里?现在它们位于
root/com\u mypackage/administrator/sql/install.mysql.utf8.sql
,它们在组件的清单中定义为:

<install><!-- Runs on install -->
    <sql>
      <file driver="mysql" charset="utf8">sql/install.mysql.utf8.sql</file>
    </sql>
</install>

sql/install.mysql.utf8.sql
然而,这在我看来并不正确。我是否应该在
标记中的路径之前包含
管理员


当然,组件本身将打包在自己的.zip中,包含在包的XML安装文件中。

不,不需要在管理员标记中添加此标记。您在manifest.xml中缺少一些 要获得完整的文档,请尝试:-

在my end manifest.xml(admin/install/install.mysql.utf8中的my.sql)上:-


社会的
开源许可证,基于GPL v2
我
developers@me.com
http://www.me.com
2012-01-01
2013年,我
1.1
install/install.mysql.utf8.sql
install/install.php
安装/卸载.mysql.utf8.sql
install/uninstall.php
其余的

<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="2.5" method="upgrade">
    <name>Social</name>
    <license>Open Source License, GPL v2 based</license>
    <author>me</author>
    <authorEmail>developers@me.com</authorEmail>
    <authorUrl>http://www.me.com</authorUrl>
    <creationDate>2012-01-01</creationDate>
    <copyright>2013, me</copyright>
    <version>1.1</version>
    <description></description>

    <!-- Installation -->   

    <install>
        <sql>
            <file driver="mysql" charset="utf8">install/install.mysql.utf8.sql</file>
        </sql>
    </install>
    <installfile>install/install.php</installfile>
    <uninstall>
        <sql>
            <file driver="mysql" charset="utf8">install/uninstall.mysql.utf8.sql</file>
        </sql>
    </uninstall>
    <uninstallfile>install/uninstall.php</uninstallfile>