• 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

I can't delete my image when it is liked because of the foreign key in mysql

Symfony 4: how to allow dynamic values for array nodes in bundle configuration?

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

VichUploaderBundle error "Expected argument of type "File", "NULL" given" when submitting the form without selecting any file

Form repeater send wrong data with last element in Laravel

Convert PHP array into HTML tag attributes separated by spaces

Get keys from associative array [duplicate]

Warning: mysqli_stmt::bind_param(): Number of elements in type definition string doesn't match number of bind variables 11 [closed]

PHPUnit (Phar) Fatal Error Only When Test Fails

PHP random string generator

Facebook SDK error: Cross-site request forgery validation failed. Required param "state" missing from persistent data

Laravel implode array items to new lines

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

Redis Command To Sort Keys

Laravel post contact form giving me error 419

About Contact Privacy policy Terms and conditions