Hello friends,

I want to know how to open a pdf file in PHP when a user clicks on that pdf link.

Like
Rules pdf when a user click that link,in the next tab pdf file of rules will open

Thanks

Recommended Answers

Just put a link in your HTML. If your server is configured properly, it will output a header announcing the file type as Content-type: application/pdf. If the client browser has a pdf plugin activated, it will show the browser in the plugin, otherwise pass it to the operating system which …

Jump to Post

All 3 Replies

Just put a link in your HTML. If your server is configured properly, it will output a header announcing the file type as Content-type: application/pdf. If the client browser has a pdf plugin activated, it will show the browser in the plugin, otherwise pass it to the operating system which has (hopefully) a PDF viewer installed.

Thanks smantscheff,
Could i open it in the next tab.
Thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.