duangang79177 2013-11-16 11:32
浏览 70
已采纳

自动更新产品版本? - PHP [关闭]

I created a product using php that I want to put on a website, but before I can do that I have to get it to update automatically. For example I have version 1.0 and there is a new version 1.2 it has to automatically ask the user to update and update if he/she has chosen to. I have part of the code to show the newest version:

$newest_version = '1.2.0';
$old_version = '1.1.0';

So actually I want it to do:

    Ask the user if he/she want to update their version of the product.
    Update the version if the user selected to.
    Check for newer version every couple of minutes/seconds.

Basically:

    Let the user upgrade their installations of my product automatically.(With PHP)

  • 写回答

1条回答 默认 最新

  • douzhantao2857 2013-11-16 12:03
    关注

    Try using this:

    if($_SESSION['current_version'] < $newest_version)
        {
            promptUpdate();
        }
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!