如何在Linux托管上使用PHP Composer
我有Linux主机使用PHP代码。我正在开发示例PHP页面,并想将其转换为PDF文件。
当我进行一些研究时,我会遇到“作曲家需要DOMPDF/DOMPDF”样式方法。
但是,我不知道如何在Linux托管中使用Composer,如何在此处安装此插件。如果您能为此提供帮助,我会很高兴。
I have linux hosting to code with php. I am developing sample php page and I want to convert it to pdf file.
When I do some research, I come across 'composer require dompdf/dompdf' style usage methods.
However, I don't know how to use composer in linux hosting, how to install this plugin there. I would be very happy if you could help with this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这只是意味着您可以在服务器上安装DOMPDF,您可以使用Composer安装它并具有自动加载,也可以手动安装DOMPDF并需要文件。
为了做到这一点,您需要首先将作曲器安装到服务器上,请参阅
安装作曲家后,您需要创建一个Composer.json文件(在线查找示例)和Composer.json文件。需要部分。
完成后,您需要在服务器上运行“作曲家安装”以安装DOMPDF。
这是我的一个项目之一的样本composer.json文件,这可能会根据您使用的框架(如果有)来有所不同:
This just means that dompdf is not installed on the server you can either use composer to install it and have it autoload or you can manually install dompdf and require the files.
In order to do this you need to first install composer onto the server, see
Once you have composer installed you need to create a composer.json file (look online for examples) and inside the composer.json file you need to add dompdf within the require section.
Once thats done you need to run "composer install" on the server to install dompdf.
Heres a sample composer.json file i have for one of my projects this can vary based on what framework (if any) your using: