• 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 file upload scanning using clamav, permissions on /tmp/

How to get array values using foreach in laravel

How to get Laravel's CSRF Token from Another Website?

Changing font color in javascript

how do i retrieve and display the alt text of an image in wordpress?

MySQL upgrade causing unexpected results on simple WHERE clauses

How to modify CSS in a specific page of the WP admin dashboard (backend)

Create a zip file and download it

Unable to create lockable file - Laravel 8 & PHP 8

PHP array slice from position + attempt to return fixed number of items

PDOException: PDO::__construct(): php_network_getaddresses: getaddrinfo failed: no such host known

Laravel Database Strict Mode

Reducing authentication calls on external API (Laravel 5.6)

Class AppHttpControllersUserController Does Not Exist

WAMP Virtual Host not working

About Contact Privacy policy Terms and conditions