• 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

PDOException: PDO::__construct(): php_network_getaddresses: getaddrinfo failed: no such host known

Laravel/ PHP: Order By Alphabetical with numbers in order [duplicate]

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

Why is this PHP array not the same?

PHP | "The requested PHP extension bcmath is missing from your system."

PDOException SQLSTATE[HY000] [2002] No such file or directory

How to convert binary string to normal string in php

Custom Button next to “ADD TO CART” button of WooCommerce based on Product Type

Fatal error: Uncaught Error: Call to undefined method mysqli_stmt::fetch_assoc() [duplicate]

correct PHP headers for pdf file download

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

I want to store data in new index as per my key in php [duplicate]

protect my blog content

Modify microseconds of a PHP DateTime object

Component install error: JInstaller: :Install: File does not exist

About Contact Privacy policy Terms and conditions