Search found 23 matches

by ale2121
Sun Dec 18, 2005 3:30 pm
Forum: PHP - Code
Topic: uploads
Replies: 2
Views: 269

uploads is in my root folder.
If I use fetch to upload files to this folder, I can view those files, just not the ones uploaded through my form.
:?

also, I know its uploading the mime type correctly because its showing up in my database correctly.
by ale2121
Sun Dec 18, 2005 9:38 am
Forum: PHP - Code
Topic: uploads
Replies: 2
Views: 269

uploads

Hi, I have a question about uploading files using a form. I've pasted my code below which uploads the files just fine, but when I try to access the uploaded files, using just a direct path to the file, it can't be viewed. For example. If I upload an image or an mp3, then try type the url of the imag...
by ale2121
Mon Aug 29, 2005 12:44 am
Forum: PHP - Code
Topic: file download
Replies: 15
Views: 1282

[SOLVED]

the problem was that i had to put my $_GET['upname'] in curly brackets and single quotes.
yay! thanks so much for helping :D
by ale2121
Sun Aug 28, 2005 11:11 pm
Forum: PHP - Code
Topic: file download
Replies: 15
Views: 1282

ok, so I got to the file, I realized it was downloading, but pumping out all this crazy data, like it's not reading the file correctly. so i added these headers to tell it how to handle the file. but this is causing another error. it says Warning: mysql_fetch_array(): supplied argument is not a vali...
by ale2121
Sun Aug 28, 2005 3:19 pm
Forum: PHP - Code
Topic: file download
Replies: 15
Views: 1282

i've tried lots of variations on the file name/path, including local and not local. this code returns a failed to open stream, no such file or directory error.

Code: Select all

<?php
	readfile("/uploads/299681.pdf");
?>
by ale2121
Sun Aug 28, 2005 2:07 pm
Forum: PHP - Code
Topic: file download
Replies: 15
Views: 1282

right now, the upload folder is in my root directory (the same as the script), until I can get this working.
the scripts are uploaded from a different script.
by ale2121
Sun Aug 28, 2005 1:46 pm
Forum: PHP - Code
Topic: file download
Replies: 15
Views: 1282

i'm trying to download files that are stored in an upload folder. i'm using php4.3, so readfile() doesn't work. I don't really understand the get_file_contents() that ambush commander sent, so i don't know how to use it in my script. i also tried to use the header() function, but that was a no go to...
by ale2121
Sun Aug 28, 2005 1:28 pm
Forum: PHP - Code
Topic: file download
Replies: 15
Views: 1282

if i can't get the file to download when i type the url into my browser, then there's probably no way php can get it either right? is this something with my server? i have the permissions to the uploads folder set to 777.
by ale2121
Sun Aug 28, 2005 12:54 pm
Forum: PHP - Code
Topic: file download
Replies: 15
Views: 1282

what could i use instead of readfile() ?
by ale2121
Sun Aug 28, 2005 12:01 pm
Forum: PHP - Code
Topic: file download
Replies: 15
Views: 1282

file download

Hi again, i'm trying to download files, but I keep getting an error that the file doesn't exist. But it does. I have the permissions to my uploads folder set to 777, even though I'm not supposed to, and if i remove the if file_exists statement i get an error saying : Warning: readfile(http://www.sub...
by ale2121
Fri Aug 26, 2005 7:27 pm
Forum: PHP - Code
Topic: header and session
Replies: 6
Views: 425

sorry :oops:
this works now
by ale2121
Fri Aug 26, 2005 6:52 pm
Forum: PHP - Code
Topic: header and session
Replies: 6
Views: 425

yeah, i knew that was the case, but I'm not sure if it's because it's actually redirecting to the signedin.php, or if the login.php was putting that there. also, i don't know if this is related, but I can't get the password function to work either. it uploads the encrypted format, but when I call it...
by ale2121
Fri Aug 26, 2005 6:19 pm
Forum: PHP - Code
Topic: header and session
Replies: 6
Views: 425

that didn't work. the url changes from ".../login.php" to " .../login.php/signedin.php" and now adds the session id to the end of that, but my signedin.php page is not actually coming up, it just resets the login.php form.
by ale2121
Fri Aug 26, 2005 6:04 pm
Forum: PHP - Code
Topic: header and session
Replies: 6
Views: 425

header and session

i'm having trouble getting a header function to point to a new url. I have a session opening right before it. Do both have to be the first info sent? if so, how can I redirect a browser once a session has been opened? session_start(); $_SESSION['band_name'] = $row[2]; $_SESSION['first_name'] = $row[...
by ale2121
Wed Aug 24, 2005 8:46 pm
Forum: PHP - Code
Topic: crazy form thing
Replies: 3
Views: 208

fixed. if (isset($_FILES['upload']['name'])) { $u = TRUE; } else { $u = FALSE; $message .= '<p>Please select a file to upload!</p>'; sorry that was a really easy answer. also, the strange part is that this also fixed a problem where my hidden form tag was not hiding. feyd | ..