• 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

PHP and WebView - Cookie doesn't are the same

how to get value from array in laravel

Transpose and flatten multiple rows of array data [duplicate]

Warning: A non-numeric value encountered

How to trim a video by 4 fragments to 4 seconds using the PHP-FFMpeg?

Unable to run composer install

PHP using str_starts_with for array to exclude same as with wildcard

Docker image build with PHP zip extension shows "bundled libzip is deprecated" warning

Set quantity minimum, maximum and step at product level in Woocommerce

Refresh specific HTML content that retrieves data from MySQL

I want to display a sweetalert after the inserting of data in my database

PHP mail sending empty mails

PHP's array_map including keys

Laravel phpunit test failing authorization

Fatal error: Array callback has to contain indices 0 and 1

About Contact Privacy policy Terms and conditions