any ideas why this does not work?
class upload {
function upload() {
upload::uploader();
}
function uploader() {
$FileName = basename($_FILES['upload1']['name']);
if
On Jan 22, 2008, at 5:01 PM, nihilism machine
[EMAIL PROTECTED] wrote:
any ideas why this does not work?
class upload {
function upload() {
upload::uploader();
}
function uploader() {
$FileName = basename($_FILES['upload1']['name']);
if
On Jan 22, 2008 8:01 PM, nihilism machine [EMAIL PROTECTED] wrote:
any ideas why this does not work?
class upload {
function upload() {
upload::uploader();
}
function uploader() {
$FileName = basename($_FILES['upload1']['name']);
nihilism machine wrote:
any ideas why this does not work?
1) the field in the form might not be 'upload1'.
2) the file is too big to upload ( max_upload_size)
3) the /tmp folder might not be writable or full
4) the folder you're trying to write into is not writable (or the drive
is full)
5)
Hi,
I have a form to upload file on my web server, so user can upload
their images.
The upload work. The user file is uploaded to my destination folder
(page5/) but the file is unreadable and the file size is smaller than
the original file size.
I run Apache with PHP 4.1.2.
Thank
On Tue, May 8, 2007 11:30 am, Eric Trahan wrote:
The upload work. The user file is uploaded to my destination folder
(page5/) but the file is unreadable and the file size is smaller than
the original file size.
$tmp_name = $_FILES['uneimage']['tmp_name'];
$type =
$error = $_FILES['uneimage']['error'];
That doesn't seem work in PHP 4.1.2... I try it but $error is empty.
And the function move_uploaded_file($_FILES['uneimage']['tmp_name'],
$target_path) returns TRUE, so the upload work (in a way !).
The problem is the file that is upload doesn't
Eric Trahan wrote:
$error = $_FILES['uneimage']['error'];
That doesn't seem work in PHP 4.1.2... I try it but $error is empty.
It just means there wasn't an error.
And the function move_uploaded_file($_FILES['uneimage']['tmp_name'],
$target_path) returns TRUE, so the upload work (in a way
On Tue, May 8, 2007 2:12 pm, Eric Trahan wrote:
$error = $_FILES['uneimage']['error'];
That doesn't seem work in PHP 4.1.2... I try it but $error is empty.
And the function move_uploaded_file($_FILES['uneimage']['tmp_name'],
$target_path) returns TRUE, so the upload work (in a way !).
Le 2007-05-08 à 16:50, Richard Davey a écrit :
By how much is the difference? Are we talking a few bytes, a few
megabytes, what?
A 116Kb file produce a 68Kb file on the server. And a 152Kb file
produce a 48Kb file on the server...
If you then download the file again, is it corrupted,
Hi,
I have some problem with uploading files on server with PHP.
The upload is ok, but I must set directory permissions with FULL Access -
but this is not a good idea :((
Have someone idea how I can do this with no setting permissions to full
acess ?
Thanks,
Rosen
reserved!
--
PHP General
On Monday 28 July 2003 21:47, Rosen wrote:
I have some problem with uploading files on server with PHP.
The upload is ok, but I must set directory permissions with FULL Access -
but this is not a good idea :((
Have someone idea how I can do this with no setting permissions to full
acess ?
i'm trying to do a very simple thing:
upload image but it keep giving me this error although i gave permession on folder:
Warning: open_basedir restriction in effect. File is in wrong directory in
/var/www/vhosts/negoumelshasha.com/httpdocs/test4.php on line 9
and here is my code:
i'm trying to do a very simple thing:
upload image but it keep giving me this error although i gave permession on folder:
Warning: open_basedir restriction in effect. File is in wrong directory in
/var/www/vhosts/negoumelshasha.com/httpdocs/test4.php on line 9
and here is my code:
[snip]
i'm trying to do a very simple thing:
upload image but it keep giving me this error although i gave permession
on folder:
Warning: open_basedir restriction in effect. File is in wrong directory
in /var/www/vhosts/negoumelshasha.com/httpdocs/test4.php on line 9
[/snip]
Have you read and
Use move_uploaded_file() instead of copy()
fr r wrote:
i'm trying to do a very simple thing:
upload image but it keep giving me this error although i gave permession on folder:
Warning: open_basedir restriction in effect. File is in wrong directory in
Hi everyone,
I have an application, where users can upload data files formatted as
follows:
0.0106375 686.60165.391
0.01147 606.46754.997
0.0122815 640.284 46.5355
0.0130753 668.396 39.3671
);
$row_split = preg_split(/\s+/, $filerow);
$value1 = $row_split[0];
$value2 = $row_split[1];
$value3 = $row_split[2];
}
Matt
- Original Message -
From: Lee P. Reilly [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, November 26, 2002 2:58 PM
Subject: [PHP] Upload
Hi,
Thanks for the reply. I appreciate your help. fgets() reads to the EOF; not the
EOL. Is there something similar to fgets() that I can use? Perhaps where I can
state explicity read the file until you encounter and EOL char?
Cheers,
Lee
Matt Vos wrote:
Loop an fgets()
i.e.
$fp =
= $row_split[1];
$value3 = $row_split[2];
}
Matt
- Original Message -
From: Lee P. Reilly [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, November 26, 2002 2:58 PM
Subject: [PHP] Upload problem - PC, *nix, and Max EOL characters
Hi everyone,
I have an application
No, fgets() reads to EOL, I use it all the time.
fread() will read to EOF, if you let it, as it is binary safe.
Matt
- Original Message -
From: Lee P. Reilly [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, November 26, 2002 4:09 PM
Subject: Re: [PHP] Upload problem - PC, *nix
safe.
Matt
- Original Message -
From: Lee P. Reilly [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, November 26, 2002 4:09 PM
Subject: Re: [PHP] Upload problem - PC, *nix, and Max EOL characters
Hi,
Thanks for the reply. I appreciate your help. fgets() reads to the EOF
I posted User Upload and with no advice I attempted to use the sources i
could find and came up with the following:
while (file_exists($i.tab)) {
$i ++;
}
$destfile = $i;
$destfile .= tab;
stripslashes($userfile);
copy($userfile, /uploads/ . $destfile);
chdir(/uploads);
$lines = file($destfile);
[EMAIL PROTECTED] wrote:
Warning: Unable to open 'C:\\My Documents\\lyrics\\C_DTBS\\SLIME.TXT' for
reading:
Has the webserver got permission to read this file? It does not seem to
be under the document root.
No such file or directory in /home/tabzilla/public_html/doadd.php
on line 89
Is
Hi,
as far as i can follow you, you want to:
1. copy a file from position a to position b.
2. read it from position b.
3. and delete it at position b.
Why not read it directly from position a?
So what about:
$content = implode(br, file($userfile));
Anyway: You should initialize $i in
Yeah I tried that as well, no dice, however here is what I the code that DID
work. Hope this helps anyone that is trying to accomplish much of the same.
Jas
?php
session_start(); //start the session if one hasn't been started
if (isset($HTTP_SESSION_VARS['user']) ||
Ok here is my error message:
Warning: Unable to open '' for reading: No such file or directory in
upload_done.php on line 9
I have checked permissions on the folder and they are correct, my only guess
is that upon doing several checks, session vars, etc... it is loosing the
file name somewhere.
Take a look at move_uploaded_file()
http://www.php.net/manual/en/function.move-uploaded-file.php
Jas wrote:
Ok here is my error message:
Warning: Unable to open '' for reading: No such file or directory in
upload_done.php on line 9
I have checked permissions on the folder and they are correct,
Ok that didn't work, so far if I select a file other than a .jpg it returns
me an error which is what I need to happen, however if I select an image
with a .jpg extension for upload it tells me the upload was successful but
when I check the directory there is never anything there. Any other
On Wednesday 22 May 2002 07:02, Jas wrote:
Ok here is my error message:
Warning: Unable to open '' for reading: No such file or directory in
upload_done.php on line 9
I have checked permissions on the folder and they are correct, my only
guess is that upon doing several checks, session
Hi All, it's my first post here.
I've got a problem with the upload. I want to upload a 4Mo file on the
server but it refuses to work. I modified the max_upload_size in the php.ini
but it continues to refuse the transfer. If I upload a smaller file it works
fine.
Someone told me to modify the
When running this code:
?php
if (is_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name'])) {
copy($HTTP_POST_FILES['userfile']['tmp_name'],
C:\Inetpub\webpub\PHP\upload);
move_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name'],
C:\Inetpub\webpub\PHP\upload);
} else {
echo Possible file
I got this:
Warning: Unable to create 'C:\Inetpub\webpub\PHP\upload':
Permission denied
in c:\Inetpub\webpub\PHP\upload.php on line 3
Warning: Unable to create 'C:\Inetpub\webpub\PHP\upload':
Permission denied
in c:\Inetpub\webpub\PHP\upload.php on line 4
Warning: Unable to move
hi my name is Cristiano and I've a question:
why the function is_uploaded_file return 1?
my example file is index.php
thanks
?php
function carica() {
global $userfile;
echo brFUNZIONE is_uploaded_file (è un boolean 0 - vero, 1 - falso)--
.is_uploaded_file ($userfile);
}
echo
.form
Hello all,
when I want to do an upload ( form ENCTYPE=multipart/form-data
action= . $PHP_SELF . method=post), sometimes ( having in form,
several input file types, ex.:input type=file name=aa), after
submit , dont show me the values uploaded ( aa_name ; aa_type) ?? Any
ideas why ?
thanks for
var_dump($HTTP_POST_FILES);
HTH
Andrey Hristov
- Original Message -
From: Miguel Loureiro [EMAIL PROTECTED]
To: php-gen [EMAIL PROTECTED]
Sent: Thursday, November 29, 2001 6:04 PM
Subject: [PHP] upload problem
Hello all,
when I want to do an upload ( form ENCTYPE=multipart/form-data
Dear PHPmania,
I am new to PHP and I start to write some script.
$folder = USER_ENV(ID_user);
// echo $folder;
$destination = /home/gilijk/data/.$folder;
// echo $destination;
if ($filename1!=none) {
copy($filename1,$destination./.$filename1_name);
echo $filename1_name telah
Hi,
I wrote a small upload script (using http) to upload various files to a
website. I am able to upload jpg and gif files but I am unable to upload
tif files. This seems strange. Could anyone please let me know what I am
missing out on? I have checked the mime.types file of apache and i saw
: [PHP] upload problem (uid)
Date: Tue, 10 Apr 2001 16:15:48 -0700 (PDT)
Are you sure it is uid 0? Unless your Apache is running as root it should
be getting uploaded as the web server uid id. Use the
move_uploaded_file() function to move the file into place.
-Rasmus
On Wed, 11 Apr 2001, b0ld
Hi,
if i upload via http the tempfile is written with uid 0 (root). After that i
cant do anything with the file because the php user is not allowed to. Why
is my uploaded file owned by root, and how do i solve that?
PS. phpinfo shows that the apache user is nobody
thx, b0ld
Are you sure it is uid 0? Unless your Apache is running as root it should
be getting uploaded as the web server uid id. Use the
move_uploaded_file() function to move the file into place.
-Rasmus
On Wed, 11 Apr 2001, b0ld b0lb wrote:
Hi,
if i upload via http the tempfile is written with
41 matches
Mail list logo