Search the Community
Showing results for tags 'file type'.
-
Hi, I bought both version of the book (1st, 2nd) and the electronic version of the second version too, awhile ago. In second book, I'm trying to modify the script (add_pdf) in the first site (selling virtual products) to add image instead of pdf, by using the script (add_other_products) in the second site example (selling physical product) Here, I upload my modified file (add_pdf). Everything goes fine when I upload an image, but for some reason I cannot view them. I keep getting the error from the script view_pdf (first site): "This page has been accessed in error." Do I need to change those values in the veiw_pdf script or something else? header('Content-type:application/image'); or header('Content-type:image/jpg'); ------------------------------------------------------------------------- // Send the content information: header('Content-type:application/pdf'); header('Content-Disposition:inline;filename="' . $row['file_name'] . '"'); $fs = filesize($file); header("Content-Length:$fs\n"); ------------------------------------------------------------------------------------ Please help me all, please Mr larry Ullman help. I'd like to be able to upload different file type, such as images(png, jpg, psd), video(mp4) and pdfs. Note: Yes, I also bought larry Ullman other books too. (php and mysql both version: 1st and second edition). This other book has a file upload with php and javascript but it's different. add_pdf.php