定制 bartonlp/mysqlslideshow 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

bartonlp/mysqlslideshow

最新稳定版本:1.0.0

Composer 安装命令:

composer require bartonlp/mysqlslideshow

包简介

Slide show driven by a mysql database table

README 文档

README

Store Slide Show information in a MySql database and show Slide Show in a browser.

History

This class was designed in 2009 and was updated April 2015 to new HTML5 and CSS3 features. It was updated again Jan. 2023.

Install

Either download the ZIP file or install with Composer.

  1. unzip the zip file (you have probably already done this if you are reading this)
  2. the directory structure is as follows:
    • examples/
    • README.html
    • README.md
    • composer.json
    • gulpfile.js
    If you loaded this with 'composer' instead of from the ZIP then this stucture is under 'vendor/bartonlp/mysqlslideshow/'.
  3. In either case you may need get *mysql* running and then:
    CREATE DATABASE mysqlslideshow;

    Create the database table. The file 'mktable.sql', in the 'examples' directory, if sourced within the 'msql' client will make the table 'mysqlslideshow'. If you want to call your table something else you can edit the 'mktable.sql' file and then either edit the 'mysqlslideshow.class.php' (NOT RECOMMENDED), or use the constructor with the additional optional arguments: The first three arguments come from the 'dbclass.conectioninfo.i.php' file. Add the forth and fifth arguments for your database name and table name.

    $ss = new MySqlSlideshow($Host, $User, $Password, 'YourDatabaseName', 'YourTableName');

    Or edit 'dbclass.connectioninfo.i.php' and add '$Database' and '$Table' and add them to the invocation above instead of the strings. You can create the table from inside the 'mysql' client by using the source statement:

    source mktable.sql;

    or just do it the hard way by typing in the create statement.

  4. add some images to your database table. There are two easy ways to do this:
    1. use the 'addupdateimage.php' program in the 'examples' directory.
    2. use the 'addimages.php' program in the 'examples' directory.
  5. try out the examples 'serverside.php' and 'browserside.html' on your own server. Then start writing your own code. Have fun. If you don't have Apache running you can use the PHP server. Just enter
    php -S localhost:8080

    from the project directory and then in your browser enter

    localhost:8080/serverside.php

    or 'browserside.html' to see the sites.

    Any questions can be sent to barton@bartonphillips.com I will try to answer reasonable questions.

Examples

There are three files in the 'examples' directory:

  • serverside.php
  • browserside.html
  • ie.html
  • mysqlslideshow.class.php

'mysqlslideshow.classs.php' is the Ajax target and has the MySqlSlideShow class.

Conclusion

The class is hosted at https://github.com/bartonlp/mysqlslideshow as well as the 'PHP Classes' http://www.phpclasses.org.

Copyright © 2009-2023 Barton Phillips http://www.bartonphillips.com barton@bartonphillips.com OR bartonphillips@gmail.com

Last Modified Jan. 27, 2023

统计信息

  • 总下载量: 20
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: Shell

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-04-16