• 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

Sort a multidimensional array by integer inside of a string value which is two levels down

Warning: A non-numeric value encountered

Wordpress wpdb->delete issue

Too few arguments to function PendingResourceRegistration::name(),1 passed in C:xampphtdocsproject outesweb.php on line 18 and exactly 2 expected

How to increase the PHP upload limits [duplicate]

Laravel 5.2: Unable to locate factory with name [default]

image source not readable

PHP contact form configuration [duplicate]

Server-sent events in PHP (without echo or print)

Do I need to install `fxp/composer-asset-plugin` if I'm not doing front-end development

PHPMyAdmin not working as intended at remote server. Error 500, $respond not found

php file upload scanning using clamav, permissions on /tmp/

How to change HTML structure inside WP <head>

Prevent blank space in pdf pages (DomPdf)

How to solve cURL error 60: SSL certificate in Laravel 5 while Facebook authentication

About Contact Privacy policy Terms and conditions