• 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

Cannot connect to own websocket server when on secured domain

How do I set the maximum php memory limit

PHP Print to Network Printer

With doctrine ODM, can I embed many subdocuments in a main document?

Store multiple fields in JSON column (Nova CMS)

Navigation idle on content download

PHP returning an error message and false

How to set dynamic `home` and `siteurl` in WordPress?

Shopify password update using Shopify API

Explode not working properly with dash

MySQL default time format UTC or GMT?

"There is no active transaction" when refreshing database in Laravel 8.0 test

XAMPP/SQLSRV: Unable to find Sqlsrv in PHPINFO(); - errors coming from connection

Laravel Nova Dependency Container what are the allowed resource properties other than id in dependsOn

Nginx RTMP not recording

About Contact Privacy policy Terms and conditions