This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## Description: Fetch and import production data | |
## Usage: import-production-data | |
## Example: "ddev import-production-data" | |
SSH_CREDENTIALS="user@domain.tld" | |
PRODUCTION_DB_USER="user" | |
PRODUCTION_DB_PASSWORD="pw" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Specifying multiple formats --> | |
<input type="file" accept=".csv, .txt" /> | |
<!-- For CSV --> | |
<input type="file" accept=".csv" /> | |
<!-- For Excel 97-2003 --> | |
<input type="file" accept="application/vnd.ms-excel" /> | |
<!-- For Excel 2007+ --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Upload files. | |
* | |
* @return void | |
*/ | |
public function uploadAction() { | |
$overwriteExistingFiles = TRUE; | |
$data = array(); | |
$namespace = key($_FILES); |