• 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

Remove "estimated for {country}" text after tax amount in Woocommerce checkout page

MySQL upgrade causing unexpected results on simple WHERE clauses

onKeyUp event calculation not working on the following rows from php generated forms except the first one

PHP: Calling MySQL Stored Procedure with Both INPUT AND OUTPUT Parameters (NOT "INOUT")

Fatal error: Trait 'LaminasDbAdapterLaminasDbAdapterAdapterInterface' not found in /var/www/vendor/laminas/laminas-db/src/Adapter/Adapter.php

WooCommerce Additional Information - if empty, hide

How can i hide dt if dd got empty value

Detect if PHP session exists

Laravel-fopen: failed to open stream: Permission denied

How to fix " Uncaught TypeError: Argument 1 passed to JpGraphException::defaultHandler() " problem in php 7.1.3 and jpgraph 4.2.6?

Transpose csv file data [duplicate]

Laravel PackageManifest.php: Undefined index: name

Split comma separated value from table column into rows using mysql?

Maatwebsite Excel 3.1 : how do I skip duplicate data when imported?

Converting IPv6 to IPv4 address in PHP

About Contact Privacy policy Terms and conditions