Jump to content

Recommended Posts

Put ini_set("display_errors", "1");  on the top of the file and delete that line - echo '<img src='.$the_file. '/>'; exit;

Trueint(108)

Warning: Cannot modify header information - headers already sent by (output started at /home1/ecosolu1/public_html/lrn/download_file.php:34) in /home1/ecosolu1/public_html/lrn/download_file.php on line 41

Plus a load of gibberish

Your not going to believe this but It WORKS!!!!!!!

 

I deleted...  if (!is_dir('/upload')) { echo "True"; } else { echo "False"; }

 

and the var dump ($uid)

 

and voile   it now sends a download window!

 

So what?

 

was it the var dump?

 

try it for yourself   http://www.lrn.computerizedgraphics.com/view_files.php    I'll be dammed

 

Now I can finally move on to the next headache.

 

Thank you Thank you Thank you :happy-04:

He-he....cool....good for you...there were too many outputs on the same html document ;)

But..I'm still surprise why this did not work.

$the_file = 'uploads/108'; // dump this result to be sure that everything is fine

echo '<img src='.$the_file. '/>'; exit;

By the way, for multiple files uploading, I'm using this API ->

http://www.plupload.com/

http://www.plupload.com/example_queuewidget.php

Edited by jazzman1

He-he....cool....good for you...there were too many outputs on the same html document ;)

But..I'm still surprise why this did not work.

$the_file = 'uploads/108'; // dump this result to be sure that everything is fine

echo '<img src='.$the_file. '/>'; exit;

By the way, for multiple files uploading, I'm using this API ->

http://www.plupload.com/

http://www.plupload.com/example_queuewidget.php

Thanks,  I'll bookmark it!

the <img tag doesn't work because the src=' ... ' attribute must be the actual url of the file so that the browser can fetch the file. the files are not stored using the id as their name. the id is the upload_id value in the database table that corresponds to the actual filename.ext the file is stored as.

 

the <img tag syntax is also missing quotes in the html around the src=' ... ' attribute.

the <img tag doesn't work because the src=' ... ' attribute must be the actual url of the file so that the browser can fetch the file. the files are not stored using the id as their name. the id is the upload_id value in the database table that corresponds to the actual filename.ext the file is stored as.

 

the <img tag syntax is also missing quotes in the html around the src=' ... ' attribute.

 

I think this is apache conf issue. On my web server, binary files as (jpg's, png's, pdf's) do not required to have ext in the end.

Edited by jazzman1

Well This was a learning experience for me.

it wasn't a total waste of time for me at least

 

Jazzman1 and mac_gyver  you guys are probably going to ignore me

 

If I come back with my next headache.

 

I'll give this a try for grins  Jazzman1

$the_file = 'uploads/108'; // dump this result to be sure that everything is fine echo '<img src='.$the_file. ' />'; exit;

 

I'll be back

Cool!

 

Now you know what simple an empty space causes in the script!

 

Read these!

 

1. Debugging: A Beginner's guide

 

2. How To Ask Questions The Smart Way

 

3. Php security tutorial

Edited by jazzman1
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.