• 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

Creating command to backup MySql database in Laravel

Set quantity minimum, maximum and step at product level in Woocommerce

Sync Records With Default Values in Pivot Tables, Call to undefined method syncWithPivotDefaults()

Why is this PHP array not the same?

PHP Startup: Unable to load dynamic library 'openssl' in Ubuntu

Printing more than one array using print_r or any other function in php

Laravel Mix Uncaught ReferenceError: $ is not defined

Using if(isset($_POST['submit'])) to not display echo when script is open is not working

PHP only Hit Counter?

How to properly start Laravel 8 with Bootstrap & authentication

how to use extended ASCII instead of unicode in PHP

Laravel: Why is my variable not being set while it's in the construct function of the controller?

mysql_result is defined but mysql_free_result warns it expected a resource

Laravel database insert with combining array and string

how to prevent float variables displaying as scientific notation when printing [duplicate]

About Contact Privacy policy Terms and conditions