可以不通过composer来使用依赖吗?
问题:
"require": { "vrana/notorm": "dev-master"},
我需要这个依赖,但是不想用composer怎么让他自动加载,能够正常使用
方法:
直接下载 https://github.com/vrana/notorm
根据手册一步一步来。
不自动加载,只能手动加载了,就是 include
<?phpinclude "notorm.php";$connection = new pdo("mysql:dbname=software");$software = new notorm($connection);foreach ($software->application()->order("title") as $application) { // get all applications ordered by title echo "$application[title]\n"; // print application title echo $application->author["name"] . "\n"; // print name of the application author foreach ($application->application_tag() as $application_tag) { // get all tags of $application echo $application_tag->tag["name"] . "\n"; // print the tag name }}?>
推荐教程:《composer》
