PS C:\wamp64\www\chloe-php\0126\composer1> composer init Welcome to the Composer config generator This command will guide you through creating your composer.json config.Package name (<vendor>/<name>) [administrator/composer1]:Define your dependencies.Writing ./composer.jsonGenerating autoload filesGenerated autoload filesPSR-4 autoloading configured. Use "namespace Administrator\Composer1;" in src/Include the Composer autoloader with: require 'vendor/autoload.php';PS C:\wamp64\www\chloe-php\0126\composer1>
以下是生成的composer.json内容:
{ "name": "administrator/composer1", "autoload": { "psr-4": { "Administrator\\Composer1\\": "src/" } }, "require": {}}