• 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

Star and Half Star Rating in Laravel

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

Laravel Delete and Update

how to create html table in php

Laravel update hasMany relationship using saveMany

nginx err_connection_refused, can anyone help me?

Store / Website Column in Magento 2 Admin Grid - Custom Module

Laravel Database Strict Mode

Correct way to use LIKE '%{$var}%' with prepared statements?

How to use functions that are declared in snippets in Evolution CMS (Modx) in an external PHP Script?

Select option menu read from database and use it's values

How to get monthly wise data in laravel

PHPExcel How to set conditional formatting to change cell background color based on cells values

MySQL order by field in Eloquent

PHP using str_starts_with for array to exclude same as with wildcard

About Contact Privacy policy Terms and conditions