How PHP implements screenshots of Web sites in a Linux environment, linuxphp_php tutorial

Source: Internet
Author: User
Tags wkhtmltopdf

Linux environment in the implementation of PHP to the site method, linuxphp


This article describes how PHP implements the Web site in a Linux environment. Share to everyone for your reference, as follows:

First step: Download wkhtmltopdf
Copy the Code code as follows: [Root@iz94aawoublz ~]# wget http://download.gna.org/wkhtmltopdf/0.12/0.12.3/wkhtmltox-0.12.3_ Linux-generic-amd64.tar.xz

Step Two: Unzip
Copy the Code code as follows: [Root@iz94aawoublz ~]# xz-d Wkhtmltox-0.12.3_linux-generic-amd64.tar.xz

Step Three: Continue decompression
Copy the Code code as follows: [Root@iz94aawoublz ~]# tar xvf wkhtmltox-0.12.3_linux-generic-amd64.tar

Fourth Step: Select Directory
Copy the Code code as follows: [Root@iz94aawoublz ~]# CD Wkhtmltox
[Root@iz94aawoublz wkhtmltox]# ls
Bin include Lib Share

Fifth step: Select the Lib directory
Copy the Code code as follows: [Root@iz94aawoublz wkhtmltox]# CD lib/
[Root@iz94aawoublz lib]# ls
libwkhtmltox.so libwkhtmltox.so.0 libwkhtmltox.so.0.12 libwkhtmltox.so.0.12.3

Sixth step: Copy libwkhtmltox.so to Usr/local/lib
Copy the Code code as follows: [Root@iz94aawoublz lib]# CP Libwkhtmltox.so/usr/local/lib
[Root@iz94aawoublz lib]# CD. /include/

Seventh Step
Copy the Code code as follows: [Root@iz94aawoublz include]# cp-r wkhtmltox//usr/local/include/

Eighth step: Install PHP Wkhtmltox
Copy the Code code as follows: [Root@iz94aawoublz include]# wget Https://github.com/mreiferson/php-wkhtmltox/archive/master.zip
[Root@iz94aawoublz include]# ls
Master.zip Wkhtmltox

Nineth Step: Unzip
Copy the Code code as follows: [Root@iz94aawoublz include]# unzip Master.zip

Tenth step: Select Directory
Copy the Code code as follows: [Root@iz94aawoublz include]# CD php-wkhtmltox-master/

11th Step
Copy the Code code as follows: [Root@iz94aawoublz php-wkhtmltox-master]#/usr/local/php/bin/phpize
Configuring for:
PHP Api version:20131106
Zend Module Api no:20131226
Zend Extension Api no:220131226

12th Step: Install
Copy the Code code as follows: [Root@iz94aawoublz php-wkhtmltox-master]#./configure--with-php-config=/usr/local/php/bin/ Php-config
[Root@iz94aawoublz php-wkhtmltox-master]# make
[Root@iz94aawoublz php-wkhtmltox-master]# make install
Installing Shared extensions:/usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/

13th step
Copy the Code code as follows: [Root@iz94aawoublz php-wkhtmltox-master]# echo "extension=phpwkhtmltox.so" >>/usr/local/ Php/etc/php.ini
[Root@iz94aawoublz php-wkhtmltox-master]# Service php-fpm restart
Gracefully shutting down php-fpm. Done

Whether the test was successful

Small test Sledgehammer:

<?phpwkhtmltox_convert (  ' image ',  array (    ' out ' = ' test1.jpg ',    ' in ' \ = ' http://www.163.com /'  ));? >

More readers interested in PHP related content can view this site topic: "PHP graphics and picture Operation skills Summary", "PHP operation Office Document Skills Summary (including word,excel,access,ppt)", "PHP date and Time usage summary", " PHP Primer for object-oriented programming, PHP string Usage Summary, Introduction to PHP+MYSQL database operations, and PHP common database operations Tips Summary

I hope this article is helpful to you in PHP programming.

http://www.bkjia.com/PHPjc/1125247.html www.bkjia.com true http://www.bkjia.com/PHPjc/1125247.html techarticle In the Linux environment, PHP implements the method of the website, linuxphp The example of the implementation of PHP in the Linux environment to the site. Share to everyone for your reference, as follows: First ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.