Read about failed to load pdf document in php, The latest news, videos, and discussion topics about failed to load pdf document in php from alibabacloud.com
PHP uses OpenOffice to turn office into PDF format
Title find the code from the Internet
PHP Code
function Word2pdf ($doc _url, $output _url) {//invoke The OpenOffice.org Service Manager $OSM = new COM ("Com.sun.star.ServiceManager")
Php uses openoffice to convert office to pdf format. for example, find the code PHPcodefunctionword2pdf ($ doc_url, $ output_url) {InvoketheOpenOffice. orgservicemanager $ osmnewCOM (& q php uses openoffice to convert office to pdf format.
Find the
Php uses openoffice to convert office to pdf format. for example, find the code PHPcodefunctionword2pdf ($ doc_url, $ output_url) {InvoketheOpenOffice. orgservicemanager $ osmnewCOM (& quot; php uses openoffice to convert office to pdf format.
Find
Php uses openoffice to convert office to pdf format, such as the question, and finds the code from the internet
function word2pdf($doc_url, $output_url){//Invoke the OpenOffice.org service manager$osm = new COM("com.sun.star.ServiceManager") or die (
It is very easy to teach to improve the quality of php code by 36. 1. do not use relative paths. you will often see: require_once (... libsome_class.php). This method has many disadvantages: it first looks for the specified php inclusion path and
You will often see:
1
require_once
(
'../../lib/some_class.php'
);
There are many drawbacks to this approach:
It first finds the specified PHP include path, and then
Php code quality is greatly improved. For more information, see
1. do not use relative pathsWe often see:
Require_once ('../lib/some_class.php ');
This method has many disadvantages:
It first looks for the specified php inclusion path and then finds
1. Do not use relative pathsWe often see:
Require_once ('../lib/some_class.php ');
This method has many disadvantages:
It first looks for the specified php inclusion path and then finds the current directory.
Therefore, excessive paths are
Improvement of PHP code quality 36 1. do not use relative paths
We often see:
require_once('../../lib/some_class.php');
This method has many disadvantages:
It first looks for the specified php inclusion path and then finds the current directory.
It first looks for the specified php inclusion path and then finds the current directory. therefore, excessive paths are checked. if the script is included by another script, its basic directory is changed to the directory where another script is
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.