• 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

is there any way to validate a field that sometime is File(image) && sometime is String(Src of same image)

Warning: Unknown: Failed to write session data using user defined save handler. (session.save_path: ) in Unknown on line 0

Can't remotely connect to MySQL error (13) with PHP script, connecting through CLI works

Remove categories with all childs derived from parent category

Using PHP to connect to a remote MSSQL database

api response laravel doesn't show

Popup Window and PHP form

Laravel Mix Uncaught ReferenceError: $ is not defined

Upload a file Using PHP and JavaScript

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given [duplicate]

Laravel Delete and Update

How to get result of the formula on import xlsx with maatwebsite using Laravel? I get formula and not value of the formula

Laravel SQL query midnight time not showing

MySQL upgrade causing unexpected results on simple WHERE clauses

how to redirect the user back to desired URL after login page in PHP?

About Contact Privacy policy Terms and conditions