• 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

Stop caching for PHP 5.5.3 in MAMP

get data-value with variable value

Wordpress how to get the post thumbnail inside a figure tag

Display Link Title Instead of URL in XSL

How update php.ini on a Mac OS X Mojave?

How do I do HTTP basic authentication using Guzzle?

php curl_exec() Connection refused when retrieving a remote image

How to display MySQL table using php and edit it in a web browser

PHP sort array of objects by two properties

What will the best solution for this multiple optional filter?

Laravel Factory not calling callback 'afterCreating'

httpd.conf on Windows: can't locate API model structure `php8_module`

Respond with status code 401 on authentication failure using Laravel and Passport?

Pass an image through AJAX [duplicate]

Transpose multidimensional array and join values with commas

About Contact Privacy policy Terms and conditions