• 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

mysql_result is defined but mysql_free_result warns it expected a resource

How to Install Composer Require doctrine/dbal

google content api for shopping

Unable to create lockable file - Laravel 8 & PHP 8

best way to store error messages in Laravel (session or variable)

How to change HTML structure inside WP <head>

Laravel Delete and Update

Any AWS EB Laravel route getting 404 Not Found nginx/1.16.1

PHP web3 ERC20 token function call

How to remove from a multidimensional array all duplicate elements including the original?

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

Multiply each value in array using array_map function

What is wrong with this inner join sql query

Telegram bot doesn't answer

Vimeo API: how to save a vimeo into a subfolder?

About Contact Privacy policy Terms and conditions