• 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

Doctrine 2 mapping referencing unique key

How to get page number on dompdf PDF when using "view"

Cannot connect to own websocket server when on secured domain

SQL to convert multiple rows into a single row of variable length

Magento 2 - Controller returning blank page

how to redirect the user back to desired URL after login page in PHP?

How to generate QR CODE for dynamic generating link and logo using Simple QrCode in laravel?

HTML + PHP + PHPMAILER

Laravel Command Schedule Not Working Properly

php echo remove slashes from url [duplicate]

How To Access A Column In M-M Relationship Table In Laravel

ldap is missing from system when installing adldap2 in laravel

PHP Get value from JSON [duplicate]

Split array into 4-element chunks then implode into strings

PHP - installing Xdebug on Mac with XAMPP (Unix File)

About Contact Privacy policy Terms and conditions