I have founded a nice library to upload file.
This library is [size="2"]FlowJS and use Composer[/size]
Now i have readed the documentation for autoload external library
[size=“2”]But i don’t understand some step:[/size]
[size="2"]1) I have installed into path \[/size]vendor\flowjs the library
(for example, i see the file [size="2"]\[/size][size="2"]vendor\flowjs\[/size][size="2"]autoload.php[/size]
[size="2"]In attachment the zip file of Flow Js php server (installed via composer)[/size]
[size="2"]2) i have created a testController:[/size]
[size="2"]
<?php
namespace app\controllers;
use yii\flowjs;
class ProvaController extends \yii\web\Controller
{
public function actionIndex()
{
$tempDir = __DIR__ . DIRECTORY_SEPARATOR . 'temp';
//Path to autoload.php from current location
//require_once '../../vendor/autoload.php';
$config = new \Flow\Config();
$config->setTempDir($tempDir);
$file = new \Flow\File($config);
die('hello');
return $this->render('index');
}
}
[/size]
[size="2"]when try the controller i got this error:[/size]
Class ‘Flow\Config’ not found
Can you help me?