• 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

Adding Multiple Custom Post Types in Wordpress

How to connect to MSSQL Server with PHP from Ubuntu 18.04?

Change user role if checkout custom checkbox is checked in WooCommerce

phpMyAdmin ERROR: mysqli_real_connect(): (HY000/1045): Access denied for user 'pma'@'localhost' (using password: NO)

Can't remotely connect to MySQL error (13) with PHP script, connecting through CLI works

How to solve Duplicate entry '0' for key 'PRIMARY' in Wordpress?

Laravel You requested 1 items, but there are only 0 items available

Laravel Blade checkbox not checked

Add 2 Webcam in one page with WebcamJS

Center point of multiple gps coordinates with php

PHP | "The requested PHP extension bcmath is missing from your system."

How to create a cookie to store the timestamp of when a page is first loaded with php

how to retrieve the first and last instance of a row in pdo dataset

Check If array is null or not in php

Adding one microsecond to Datetime object in PHP

About Contact Privacy policy Terms and conditions