We help IT Professionals succeed at work.
Get Started

Trying to display file in browser with php

Richard Korts
on
81 Views
Last Modified: 2018-09-29
I have this code. This is the entire php file:
<?php
// read file & display. File passed in $_GET
$path = "../summsp/" . $_GET['file'];
echo get_file_contents($path);
exit;
?>

Open in new window


I execute it like this:

https://www.lakoshvac.com/disp_summary.php?file=18075summary.pdf

I get a blank screen.

The directory structure is in the attached file. I cannot show you the file contents (pdf) because it is sensitive.

Why do I get a blank screen?

Thanks
Server_dir_sructure.JPG
Comment
Watch Question
CERTIFIED EXPERT
Most Valuable Expert 2020
Most Valuable Expert 2018
Commented:
This problem has been solved!
Unlock 1 Answer and 7 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE