• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

backup files to google drive using PHP

phpmysqlgoogle-drive-api


PHP Snippet 1:

// User home directory (absolute)
$homedir = trim(shell_exec("cd ~ && pwd"))."/"; // If this doesn't work, you can provide the full path yourself
// Site directory (relative)
$sitedir = "www/";

PHP Snippet 2:

// User home directory (absolute)
$homedir = "/home/mhmd2991/"; // <-- FIXED HERE
// Site directory (relative)
$sitedir = "public_html/";

Related Snippets

Yii2: How do I debug console commands?

How to add a custom field to all Woocommerce attribute terms using add_action

Get sum of arrays inside array

How to Create WooCommerce Subscription Product via. REST API?

"cannot list resources" error from WooCommerce REST API

How to validate Envato Purchase Code in PHP

How to insert Google Adsense Code in PHP script?

MongoDB Duplicate Documents even after adding unique key

Fatal error: [] operator not supported for strings

How to create a individual template for page or post in custom plugin?

Applying programmatically a coupon to an Order in WooCommerce3

SlimExceptionHttpNotFoundException

Add bold text and line break into Laravel Notification Email

MySQL order by field in Eloquent

How to MODIFY a Google Docs document via API using search-and-replace?

About Contact Privacy policy Terms and conditions