PHPInstaller Archiving files to 1 php file.

    Hello.

    I want to introduce my little development, which will facilitate the installation of scripts on another hosting PHPInstaller.
    It is enough to indicate on a local computer what files are needed for packaging, register the package name, version, author and collect the package in 1 php file!

    How does it work?


    The script uses the PclZip class to pack and unpack the archive.
    In the process, the script creates a semblance of XML. The packed archive is encoded with base64_encode, this increases the archive by 33%, but it deprives the user of the need to upload in binary form, and there are problems in the contents of the archive in XML.
    That's why Base64 ... :)

    After the script runs, 1 script appears that contains the archive and the shell for unpacking.

    From words to example


    I will show an example in more detail on the phpMyAdmin package assembly .

    Step 1


    Run the script and immediately enter the name of the package, the author, and also indicate the location of the files.
    (pictures are clickable)




    Step2


    Click on the button “Collect package”.
    The script will pack everything into 1 file and give its name:


    Step3:


    Copy the file to a separate folder for testing.


    Step4


    Let's go into the folder, as we see only 1 file.


    Step5 - what it looks like


    Run the script


    Step 6.


    Result


    Step7


    We go to index.php and voila. Download. TODO: 1. SQL support. That the installer also installed in the database. 2. When creating, make export from the database the necessary tables. 3.? your options. Thanks. PS: a couple of packages to try out locally.













    Also popular now: