• 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

TesseractOCR not working for Laravel

How to convert the int value to inch in PHP [closed]

Using PHP to connect to a remote MSSQL database

PHP file_get_contents function

add_action() function in wordpress not working [duplicate]

Laravel after login Two factor not working

Combine multiple columns into an array as one of the key in a results set

Form repeater send wrong data with last element in Laravel

PHP 8 - libxml_disable_entity_loader() has been deprecated. How do I replace the functionality it provides?

Symfony Mercure "Failed to send an update"

Symfony run hint kernel.secret parameter not found

What is the function of the (new Date()).getTime() in PHP?

laravel sanctum Route [login] not defined

PHP echo values of all sub keys [duplicate]

Execute only one time and then wait set period of time before executing again

About Contact Privacy policy Terms and conditions