• 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

Laravel Jetsream Profile page not loading on fresh install

php: command not found Command PhaseScriptExecution failed with a nonzero exit code

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

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

Merge key and value of array index [duplicate]

JQuery content editable div and text box on submit not sending POST

How to disable only_full_group_by option in Laravel

Implode columnar values between two arrays into a flat array of concatenated strings

What is the function of the (new Date()).getTime() in PHP?

Laravel Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) on a sub query with "ROW_NUMBER() OVER PARTITION"

Timber: Single post pagination does not work (wp_link_pages)

How to convert a carbon into string, to take the date only?

image source not readable

How to reset Laravel AuthManager/guards in between API calls in tests?

Fetch files from next cloud storage and display in Laravel website

About Contact Privacy policy Terms and conditions