• 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

echo language construct is discouraged. (PHP)

Target class controller does not exist - Laravel 8

Store / Website Column in Magento 2 Admin Grid - Custom Module

Timber: Single post pagination does not work (wp_link_pages)

How to redirect to another page and call a Function there on Angular ng-click

Unable to Edit config.inc.php

Add rows to Single product Additional information table in WooCommerce 3.6

PHP: convert all UTF-8 characters to HTML entities

Laravel csrf token mismatch for ajax POST Request

Limit of log line written to Apache Errorlog from mod php error_log

Facebook SDK error: Cross-site request forgery validation failed. Required param "state" missing from persistent data

Prestashop webservice API creating cart rules

How to get total pages of PDF with FPDF?

Vimeo API: how to save a vimeo into a subfolder?

Laravel - Browser displays message again when I press back button

About Contact Privacy policy Terms and conditions