Skip to content

Instantly share code, notes, and snippets.

@gnutix
Last active December 23, 2015 02:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gnutix/6569432 to your computer and use it in GitHub Desktop.
Save gnutix/6569432 to your computer and use it in GitHub Desktop.
Example how to manage verot's upload PHP class dependency with composer.
{
"require": {
"php": ">=5.3.0",
"verot/upload-class": "0.32"
},
"repositories": {
"verot-upload-unofficial": {
"type": "package",
"package": {
"name": "verot/upload-class",
"version": "0.32",
"dist": {
"url": "http://www.verot.net/download/class.upload.php/class.upload.zip",
"type": "zip",
"reference": "v0.32"
},
"autoload": {
"files": [
"class.upload.php",
]
}
}
}
}
}
<?php
require_once dirname(__FILE__).'/vendor/autoload.php';
$upload = new Upload('myfile.jpg', 'fr_FR');
// use the $upload class to do whatever you need
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment