Reputation: 137
I created a Wordpress Plugin to be able to create an instance on AWS.
After fixed my autoloader cause namespace, now it does work both on Linux and Win, but in Linux I still got this error: Fatal error: Class 'Aws\EC2\Ec2Client' not found in blablabla
File structure:
root
vendor
|-->aws
|-->composer
|-->twig
|-->...
|-->autoload.php
index.php
In index.php:
require plugin_dir_path( __FILE__ ) . '/vendor/autoload.php';
Why I have this problem on Linux?
Thanks
Upvotes: 0
Views: 258
Reputation: 1049
Microsoft operating systems (DOS and Windows) use backslashes "\", UNIX-based operating systems (Linux) use slashes "/".
Use PHP's helper: DIRECTORY_SEPARATOR
to automatically detect the backslashes/slashes.
Upvotes: 1