search
Homephp教程php手册PHP 预览PDF时一种错误情况的解决

PHP 预览PDF时一种错误情况的解决

Jun 06, 2016 pm 07:51 PM
pdfphpConditionsolvemistakePreviewfirst

如图,首先想到的肯定是路径、文件是否存在、文件名等。但是这些问题我都一一排除了,最后就剩下代码了。 我是通过别的网页传递ID然后进数据库找PDF路径的,之前还include了其他的一些php文件,conn肯定是必须的了。 我对代码里的每一行进行逐行注释, 发现

                                                            

                                                       PHP 预览PDF时一种错误情况的解决

    如图,首先想到的肯定是路径、文件是否存在、文件名等。但是这些问题我都一一排除了,最后就剩下代码了。

    我是通过别的网页传递ID然后进数据库找PDF路径的,之前还include了其他的一些php文件,conn肯定是必须的了。

     我对代码里的每一行进行逐行注释,发现有一行include的代码被注释掉之后就正常了,而且毫无影响,再进那个php里去看一看,我觉得可能跟那个文件里开头有session_start有关。

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.