使用PHP将网站+数据库上传到保管箱 [英] Upload website + database to dropbox with PHP

查看:54
本文介绍了使用PHP将网站+数据库上传到保管箱的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道,是否可以使用php或其他方式将我的网站和数据库备份到保管箱帐户?
如果可能的话,我该怎么做才是最好的方法? :-)

Does anyone know, if it's possible to backup my website and database to a dropbox account with php or something? And if it's possible, how can I do it the best way? :-)

最好的问候
Simon

Best Regards Simon

推荐答案

是的,请查看 dropbox-php

文档中的示例代码:

/* Please supply your own consumer key and consumer secret */
$consumerKey = '';
$consumerSecret = '';

include 'Dropbox/autoload.php';

session_start();
$oauth = new Dropbox_OAuth_PHP($consumerKey, $consumerSecret);

// If the PHP OAuth extension is not available, you can try
// PEAR's HTTP_OAUTH instead.
// $oauth = new Dropbox_OAuth_PEAR($consumerKey, $consumerSecret);

$dropbox = new Dropbox_API($oauth);

$dropbox->putFile('newPath.txt','/local/path/tofile');

这篇关于使用PHP将网站+数据库上传到保管箱的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆