• 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

Wordpress add responsive srcset header image to theme

Laravel print last executed SQL query with Query log

(PHPUnit) PHP Fatal error: Uncaught Error: Call to undefined function each()

getting error while enter Command => php artisan route:list

How to skip cart page on woocomerce for certain products only?

WooCommerce Additional Information - if empty, hide

How to run or debug php on Visual Studio Code (VSCode)

Error loading MySQLdb Module 'Did you install mysqlclient or MySQL-python?'

Auto increment id JSON

Add bold text and line break into Laravel Notification Email

Destroy session upon refresh

How to get variable from JavaScript to PHP [duplicate]

unable to load your default controller on Codeigniter

OAuth2 Token PHP

Add and update products to session cart in Laravel

About Contact Privacy policy Terms and conditions