It sounds like your just trying to open the file straight from your hard
drive using IE. Unfortunately, PHP doesn't work like HTML files or
JavaScript in that its not IE or any other web browser that makes PHP
work. It is actually a server that works out all the PHP bits, puts it all
in the right
On Tue, 14 May 2002, John Ngo wrote:
actually i looked up pjpeg
turns out its an actual filetype in its own right haha
pjpeg uses progressive encoding as opposed to normal jpeg or something
whats weirder is everyfile i've tried on my computer appears to be pjpeg
encoded
You're probably
Hi,
Ok there were a lot of mistakes in that code. IN fact
i rubbed it off completely and am using a new code..
Everything works fine now, except that if the filename
exists, any new file with the same name overwrites the
old file.. What do i do about it?
Here is the code i'm using :
?php
Well, first thing I notice is that in your form you name your file input as
file, yet nowhere in your code do I see you getting any values from _FILES
or $file (depending on your version of PHP). So...how do you expect it to do
anything with your file if you don't tell it to?? Maybe you left out
-Original Message-
I'm curious, I keep seeing people say that that tag is
/necessary/, but I've never had to use it in the upload forms
that I've built and they work just fine in Opera, NN IE.
Good question. To be honest it's been a while since I looked, I built a
file
On Tue, 7 May 2002, Jason Wong wrote:
INPUT TYPE=hidden name=MAX_FILE_SIZE value=2048000
You actually _need_ that hidden tag set AFAIK.
I'm curious, I keep seeing people say that that tag is /necessary/, but I've
never had to use it in the upload forms that I've built and they work just
On Tuesday 07 May 2002 15:22, Miguel Cruz wrote:
On Tue, 7 May 2002, Jason Wong wrote:
INPUT TYPE=hidden name=MAX_FILE_SIZE value=2048000
You actually _need_ that hidden tag set AFAIK.
I'm curious, I keep seeing people say that that tag is /necessary/, but
I've never had to use it in
On Tuesday 07 May 2002 14:14, David Freeman wrote:
I guess that anything that causes this sort of thing to happen on the
browser is going to help. I know I'd be fairly unimpressed if I sat
waiting for a 2MB file to upload only to find that the limit is 1.5MB or
some such. At least if a
-Original Message-
Hmm, after a bit of testing I find that the MAX_FILE_SIZE
tag is useless to say the least (probably because no browsers support
it?)
That's somewhat of a shame I guess but I can hardly claim to be
surprised - especially as I've just spent much of my time in the
I put the max file size tag into my code but that didn't help either. What
looks like is happening is that the php file can't be found. I'm using
phpscriptcenter's upload.php program and it is all in one script, if you
know what I mean.
What I'm seeing now is that, depending on the size of the
On Tuesday 07 May 2002 19:09, David Freeman wrote:
-Original Message-
Hmm, after a bit of testing I find that the MAX_FILE_SIZE
tag is useless to say the least (probably because no browsers support
it?)
That's somewhat of a shame I guess but I can hardly claim to be
Wong [EMAIL PROTECTED]
Date: Tuesday, May 7, 2002 8:49 am
Subject: Re: [PHP] File upload problem
On Tuesday 07 May 2002 19:09, David Freeman wrote:
-Original Message-
Hmm, after a bit of testing I find that the MAX_FILE_SIZE
tag is useless to say the least (probably because
D'oh! You're right, I went back and checked php.ini and found
upload_max_filesize but it's already set to 200M, I'm assuming that means
200 MegaBytes. So I don't think that's the problem. I don't have the
hidden tag set in the page code so that shouldn't be a factor either, right?
I'm a real
-Original Message-
D'oh! You're right, I went back and checked php.ini and
found upload_max_filesize but it's already set to 200M, I'm
assuming that means 200 MegaBytes. So I don't think that's
the problem. I don't have the hidden tag set in the page
code so that
On Tuesday 07 May 2002 09:01, David Freeman wrote:
-Original Message-
D'oh! You're right, I went back and checked php.ini and
found upload_max_filesize but it's already set to 200M, I'm
assuming that means 200 MegaBytes. So I don't think that's
the problem. I don't have
Good day,
Calm down, the excessive !'s are a bit unnecessary.
One possible solution is to read the entire thing into one string, and then
use the split or preg_split function on the \r against it. This will give
you an array with one line per entry.
Darren Gamble
You haven't defined $file_name before trying to echo it, I think you'll
have to create it using $HTTP_POST_...['file'] and HTT...['name']
Also check your php.ini to see if file uploads are allowed and if yes the
max. limit.
I have searched high and low and done everything
recommended
$HTTP_POST_FILES/$_FILES is provided to contain the uploaded file
information.
The contents of $HTTP_POST_FILES are as follows. Note that this assumes the
use of the file upload name 'userfile', as used in the example script above:
$HTTP_POST_FILES['userfile']['name']
The original name of
Say it with me... Show me the code! No, louder! Yeah...that's good...
What's my name?
---John Holmes...
- Original Message -
From: Nick Wilson [EMAIL PROTECTED]
To: php-general [EMAIL PROTECTED]
Sent: Wednesday, May 01, 2002 3:24 PM
Subject: [PHP] file upload / no tmp name or size?
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
* and then 1LT John W. Holmes declared
Say it with me... Show me the code! No, louder! Yeah...that's good...
Sorry, i figured it would be something someone would spot immediately.
here is the form
/* add_teacher_form() */
function
To: Antonio; [EMAIL PROTECTED]
Subject: Re: [PHP] file permissions on counter?
Hi Antonio,
try this for your fopen():
$file=fopen(counter.txt,r+)
Incase you're interested, here's the code I use whenever I need to use
a
simple text-file based counter:
?
$file = .count.txt;
$fp
I think this is only an issue with an un-patched IE5.01, anything higher
than that should work fine.
.b
-Original Message-
From: Negrea Mihai [mailto:[EMAIL PROTECTED]]
Sent: 23 April 2002 12:26
To: [EMAIL PROTECTED]
Subject: [PHP] file download in IE
Hi!
How on earth do I
On Tue, 23 Apr 2002, .ben wrote:
I think this is only an issue with an un-patched IE5.01, anything higher
than that should work fine.
In my experience, there're problems even with MSIE 6.x.
Regards,
Rodolfo.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
You should check the whole path and make sure Apache has enough rights
to read through all directories.
Bogdan
Antonio wrote:
Hi, I have to read a simple counter on my server, but the server
responses that I haven't permissions to open the file which contains the
data in write mode. This
Hi Antonio,
try this for your fopen():
$file=fopen(counter.txt,r+)
Incase you're interested, here's the code I use whenever I need to use a
simple text-file based counter:
?
$file = .count.txt;
$fp = fopen($file,r+);
$counter = fread($fp, filesize($file));
fclose($fp);
$counter +=1;
$fp =
According to this, you should actually use unlink, but delete is available.
http://www.php.net/manual/en/function.delete.php
-Natalie
-Original Message-
From: jas [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 17, 2002 4:08 AM
To: [EMAIL PROTECTED]
Subject: [PHP] file delete...
On Wed, 2002-04-17 at 13:12, Leotta, Natalie (NCI/IMS) wrote:
According to this, you should actually use unlink, but delete is available.
http://www.php.net/manual/en/function.delete.php
-Natalie
That's not actually what the page says...;)
-Original Message-
From: jas
Did you check the manual? Like php.net/delete perhaps which tells you the
PHP function that does this is actually called unlink().
-Rasmus
On Wed, 17 Apr 2002, jas wrote:
How can I delete a file in php?
thanks in advance,
Jas
--
PHP General Mailing List (http://www.php.net/)
To
Liam Gibbs wrote:
Is there a way for a script to tell if the file it's
trying to access is locked by other script (via
flock()) or not. I need to make script wait untill
other script running in a parallel thread releases the
lock on the file.
Without testing, would this work? Just a
Is there a way for a script to tell if the file it's
trying to access is locked by other script (via
flock()) or not. I need to make script wait untill
other script running in a parallel thread releases the
lock on the file.
Without testing, would this work? Just a suggestion
(read: shot in the
This sounds similar to what I am having, but not exactly. What version
of PHP are using, and on what platform?
My problem is the files don't actually appear on the filesystem, yet all
of the internal functions in PHP that allow me to manipulate the files
appear to work.
I'm using v4.1.2, and
You read the entire file into memory (an array using file() perhaps) and
then edit it in memory and write the entire new file back out.
-Rasmus
On Mon, 25 Mar 2002, Randy Johnson wrote:
Hello,
I want to be able to edit part of a file. via a text box using php how do i read a
file and
How do I know what part of it to read in the array?
- Original Message -
From: Rasmus Lerdorf [EMAIL PROTECTED]
To: Randy Johnson [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, March 25, 2002 9:03 PM
Subject: Re: [PHP] File Edit
You read the entire file into memory (an array
: [PHP] File Edit
You read the entire file into memory (an array using file() perhaps) and
then edit it in memory and write the entire new file back out.
-Rasmus
On Mon, 25 Mar 2002, Randy Johnson wrote:
Hello,
I want to be able to edit part of a file. via a text box
: Rasmus Lerdorf [EMAIL PROTECTED]
To: Randy Johnson [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, March 25, 2002 9:11 PM
Subject: Re: [PHP] File Edit
You read all of it
On Mon, 25 Mar 2002, Randy Johnson wrote:
How do I know what part of it to read in the array?
- Original Message
123.45.456.789
123.456.789.12
;;
- Original Message -
From: Rasmus Lerdorf [EMAIL PROTECTED]
To: Randy Johnson [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, March 25, 2002 9:11 PM
Subject: Re: [PHP] File Edit
You read all of it
On Mon, 25 Mar 2002, Randy Johnson
if(!userfile)
echo ERROR;
$filelocation=/tmp;
Does C:\tmp exist?
copy($userfile, $filelocation)
The message I get in my browser is:
Warning: Unable to open 'C:\\Documents and
Settings\\vlad\\Desktop\\satellite\\florida.jpg' for reading: No such
file or directory in
Warning: Unable to open 'C:\\Documents and
Settings\\vlad\\Desktop\\satellite\\florida.jpg' for reading: No such
file or directory in /var/www/kulchitski/btl/_talkroom_submit.php on
line 15
Well it says Unable to open.
My guess is the file u want to upload doesn't exist.
What do u use
I guess, you don't specify the enctype in the form you wrote.
Do you write like this?
form method='post' action='upload.php' enctype='multipart/form-data'
.
/form
Hiroshi Ayukawa
http://hoover.ktplan.ne.jp/kaihatsu/php_en/index.php
--
PHP General Mailing List (http://www.php.net/)
To
-Original Message-
From: Alan McFarlane [mailto:[EMAIL PROTECTED]]
Sent: 07 March 2002 03:20
I've seen and successfully used the built-in function
'mkdir()' on several
occasions, but I am having trouble understanding the mode parameter.
I've seen 0771, 0775 and 0777 used on
This is exactly how I solve the problem as well, good to know I'm not the
only one with that idea. That must mean it wasn't that bad of an idea.
Dna
-Original Message-
From: Niklas Lampén [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 05, 2002 6:52 AM
To: Php-General
Subject: RE: [PHP
Perfect! Thank you, my mind was out in left field somewhere.
On Tue, 12 Feb 2002, DL Neil wrote:
Hi Scott,
In my constant effort to improve my perl conversion project, I have a
question regarding file reading. I am taking two files and combining
them in an array and then writing out
Hi Scott,
In my constant effort to improve my perl conversion project, I have a
question regarding file reading. I am taking two files and combining
them in an array and then writing out a new file. Is there a way to:
a)strip out the first line of the second file
b)test for conditions
Well, you have to send the actual file - otherwise the result of a zero-length
file is not surprising at all.
Bogdan
Ed Lazor wrote:
I'm trying to figure something out and thought I'd see if you guys have any
ideas.
The goal: tracking the number of downloads for files on the server.
The
what about this?
?php
header(Location: $url_to);
exit;
?
http://server/download.php?url_to=/myfile.zip
check out
http://www.philipsdomain.com/hyperlinks/ for a redirect sample.
- Original Message -
From: Ed Lazor [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent:
At 12:58 AM 2/11/2002 +0200, Bogdan Stancescu wrote:
Well, you have to send the actual file - otherwise the result of a zero-length
file is not surprising at all.
That makes sense. I thought the last line was doing that. How would I do
it in a way that works for local and remote files?
Ah, didn't know you also serve remote files. In this case Philip's solution makes
much more sense - otherwise you'll have to download the file on the server side and
upload it to the client, which is way too much fuss to worth it.
Bogdan
Ed Lazor wrote:
At 12:58 AM 2/11/2002 +0200, Bogdan
Linn Kubler wrote:
I've setup an upload form for uploading files to my server. It seems to
work well except the performance is pretty sad. For example it took 20
minutes to upload a 50MB file over a 100Mb LAN. This is running on Linux
w/Apache.
At the heart of the script is the copy()
The username will be the same username that apache is running as, which you
can specify in your httpd.conf file.
-Jeff
At 10:32 AM 2/6/2002 -0500, Ben Crawford wrote:
I apoligize if this question has already been asked but
I am looking to upload files to my server. I use a form and can
Hi Balaji,
I am trying to upload a file from remote machine.
Could you please help out me.
Two things:
upload.html
-
form action='upload.php' method='post' enctype='multipart/form-data'
This also needs to have a maximum file size specified:
INPUT TYPE=HIDDEN
On Sun, 2002-02-03 at 14:06, Lars Torben Wilson wrote:
On Sun, 2002-02-03 at 12:12, Mike Frazer wrote:
Your reply piqued my curiosity so I whipped together a script that times the
execution of a foreach(), a while() and a for() loop executing the same
commands. The results were rather
On Sun, 2002-02-03 at 02:35, Mike Frazer wrote:
A slightly less cumbersome method than the while() loop below would be a
foreach() loop:
function check_file($filename) {
if (!$lines = file($filename)) {
return false;
}
foreach ($lines as $line) {
$num_pipes
Your reply piqued my curiosity so I whipped together a script that times the
execution of a foreach(), a while() and a for() loop executing the same
commands. The results were rather surprising in some ways but not really
overall.
The while() loop is, as you stated, is quicker than a foreach()
On Sun, 2002-02-03 at 12:12, Mike Frazer wrote:
Your reply piqued my curiosity so I whipped together a script that times the
execution of a foreach(), a while() and a for() loop executing the same
commands. The results were rather surprising in some ways but not really
overall.
The
A slightly less cumbersome method than the while() loop below would be a
foreach() loop:
function check_file($filename) {
if (!$lines = file($filename)) {
return false;
}
foreach ($lines as $line) {
$num_pipes = substr_count($line, '|');
if ($num_pipes 2 ||
On Fri, 2002-02-01 at 14:02, toni baker wrote:
I would like to prevent users from uploading a file
that contains more than 4 pipes or less than 2 pipes.
The code below prevents users from uploading a file
containing more than 4 pipes, but not less than 2
pipes. Should I use awk, ereg, or
you just have to chmod the directory where you would copy
files to. try chmod 777. all users should have write permissions
now.
shann.
Val Petruchek [EMAIL PROTECTED] schrieb im Newsbeitrag
001c01c1aa66$02b9ed50$[EMAIL PROTECTED]">news:001c01c1aa66$02b9ed50$[EMAIL PROTECTED]...
Hello,
Hi
It's in the manual at :
http://www.php.net/manual/en/features.file-upload.php
Regards
Girish
--
www.girishnath.co.uk
- Original Message -
From: qartis [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, January 28, 2002 6:37 PM
Subject: Re: [PHP] File
Hi
It's in the manual at :
http://www.php.net/manual/en/features.file-upload.php
Regards
Girish
--
www.girishnath.co.uk
- Original Message -
From: qartis [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, January 28, 2002 6:37 PM
Subject: Re: [PHP] File
I think you might be looking for input type=file HTML form element.
Duky Yuen [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I want to make something like when you are attaching something to an
email in hotmail. I want to make something that searches your own
On Monday 21 January 2002 10:34, Uma Shankari T. wrote:
Hello,
How to upload files in a particular directory using php script in the
browser itself
The gory details can be found in the chapter Handling File Uploads.
--
Jason Wong - Gremlins Associates - www.gremlins.com.hk
/*
Love is
Try this:
?php copy($PHP_UPLOADED_FILE_NAME,$DOCUMENT_ROOT.$REQUEST_URI); ?
- Original Message -
From: Uma Shankari T. [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 21, 2002 3:34 AM
Subject: [PHP] File Uploading
Hello,
How to upload files in a particular
Hello,
When i upload the file it is updating only in the document root
directory.It is not updated in some other directory except the root
directory.why is it so?
Any one tell me the solution for this?
Regards,
Uma
--
PHP General Mailing List (http://www.php.net/)
To
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
* On 21-01-02 at 14:24
* Uma Shankari T. said
Hello,
When i upload the file it is updating only in the document root
directory.It is not updated in some other directory except the root
directory.why is it so?
Any one tell me
On Monday 21 January 2002 21:17, Uma Shankari T. wrote:
Hello,
When i upload the file it is updating only in the document root
directory.It is not updated in some other directory except the root
directory.why is it so?
Any one tell me the solution for this?
The general procedure for
How can I, using:
INPUT TYPE=\FILE\ NAME=\UPLOAD_FOTO\ SIZE=\40\
specify the file extension.
I want the user only to upload *.jpg.
You can only check $userfile_type to detect the type of uploaded file. You
can specify nor extension to browse dialog neither default path for
browsing...
you could write a bit of JavaScript to run on the form's onSubmit event or
even the fields onBlur event. Then in your JavaScript, parse out the file
name and extension to validate. It's not 100% accurate since users could
rename any file to have a JPG extension, but it works for the
The official way to do this would be using the accept attribute:
accept = content-type-list [CI]
This attribute specifies a comma-separated list of content types that a
server processing this form will handle correctly. User agents may use this
information to filter out non-conforming files when
On Tuesday 22 January 2002 07:00, will hives wrote:
Please can someone help, I can't find any answers anywhere
I have this code:
[snip]
it's really just an online contacts book, what I want to do as have the
ability to upload an image with the record.
Then when the contact details
I'm assuming all this data is coming in from a form - somewhere in the
manual (too lazy at the monent to look where) there's a section on how to
upload files. Once a file is uploaded (in your case, an image), just move it
to somewhere accessable. Have field in the database that contains the name
set your max upload file size smaller then. default is 2mb max. I find that
too small, I re-set mine to 5mb. I have 2g of ram on our server, 5mb isnt a
worry to me. Id rather that then the slow speed of writing the file to the
hd.
--
Chris Lee
[EMAIL PROTECTED]
David [EMAIL PROTECTED]
That's a browser/image type issue. If you're trying it with a JPEG image (as the
message title suggests) then it's a browser issue -- your browser doesn't handle
JPEG files due to local settings, and starts up the paint program instead. If
you're trying with some other image type (such as TIFF
thanks, i know what u mean, but what if you have to upload bigger files?
is it possible that maybe the next php release will have a option to auto write the
uploading file to disk(if the file being uploaded is bigger than a certain size) while
uploading instead of slurping the entire file
Well, I just finished a ftp program that originally used php to catch the
uploaded file, but soon realized the it did load it into memory then dump it
into a file. I finally ended up using perl running with xinetd to capture
the uploaded file and drop it into a file. then let php play with it
Security, you know...
Browser will not allow you to save files on LOCAL drive
Otherwise Internet should be very dangerous thing
- Original Message -
From: Helmut Habiger [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, December 10, 2001 5:57 PM
Subject: [PHP] file downlaod via
NO answer, but two more questions:
1. Do you want the authentication on your site to extend to the other?
2. Why not have the other site do it's own authentication?
I've noticed this. On a client's publishing site I have two forms of
authenitication. ONe for subscribers, hacked together by
Hi :-)
could you post your code?
regards,
--Patricio
- Original Message -
From: Nikola Veber [EMAIL PROTECTED]
To: php forum [EMAIL PROTECTED]
Sent: Thursday, November 22, 2001 10:01 PM
Subject: [PHP] file upload troubles
Hi !
I'm having terrible troubles with the file upload program
You can just link to the file eg
a href=yourfilenamehere.whatever_extdownload file/a
just make sure the path is correct.
Joe Van Meer wrote:
Hi there. How would I go about downloading a file off of the server. The
filename will always be the same in my case. Say it is sitting in a
directory
Hello,
I found the solution to my problem here it is.
Adding the following line in the HTML seems to make the PHP code work well
with the Upload Form.
!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN
Don't know why but, I guess this makes the document HTML compliant.
Regards,
Well, this is a problem.. with perl, you can use suidperl, but not with
php.. the most easyest way is to give write permission to apache user to the
directory you want to upload the files...
Rafael Steil
On Wednesday 24 October 2001 11:43, you wrote:
Hello-
I'm trying to write a
I've run into the same problem, I had to 'chmod 777 images' to be able
to create dirs or files, which is BAD security!
Brian Aitken wrote:
Hiya
I promise I won't keep perstering you after this question :-)
My problem is this - I've got a complete system that works perfectly on
Linux
Hi,
It looks most certainly like a file permission error,
however if you have concurrent users maybe it's over
riding the file contents, and screwing up something
somewhere.
So use flock(), a tutorial :
http://www.paphe.com/php/tutorials/111000.php
=
*
Know
The code is being written for both Unix and windows boxes, so I had to
include the 'b' option
Maxim Maletsky (PHPBeginner.com) wrote:
Not sure, but this 'wb' looks suspicious to me.
From the manual:
The mode may contain the letter 'b'. This is useful only on systems
which
Use the '.inc' extension only for files that are not directly accessible to the client.
For example, database configuration files do not need to be php and you can mark them
as '.inc' for increased code legibility. AFAIK a client's request to one of these files
won't be served at all.
D. Alvarez
On Wednesday 03 October 2001 12:13, Jan Grafström wrote:
Hi!
How does server handle the .inc extension and for what do I use it ?
You should be aware that if the webserver is not set up to handle .inc files
as PHP code, that it might output them as text to the user. Thus possibly
showing
On Wednesday 03 October 2001 12:13, Jan Grafström wrote:
Hi!
How does server handle the .inc extension and for what do I use it ?
You should be aware that if the webserver is not set up to handle .inc files
as PHP code, that it might output them as text to the user. Thus possibly
showing
Even better use mod_rewrite so that .inc files
are never displayed :-)
Jeremy Allen
elliptIQ Inc.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL
Even better use mod_rewrite so that .inc files
are never displayed :-)
mod_rewrite is severe overkill for this. Just use:
Files ~ \.inc$
Order allow,deny
Deny from all
/Files
-Rasmus
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
, an ITW Company
www.foxjet.com
- Original Message -
From: Rasmus Lerdorf [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, October 03, 2001 1:59 PM
Subject: RE: [PHP] File extension inc?
Even better use mod_rewrite so that .inc files
are never displayed
If you use fgets(), you can loop through it like the example does :
http://www.php.net/fgets
Or, consider the file() function which automagically assigns each line to
an element of the array.
http://www.php.net/file
Or, you could open the file as a one string using fread(), see the
Not sure, but this 'wb' looks suspicious to me.
From the manual:
The mode may contain the letter 'b'. This is useful only on systems
which differentiate between binary and text files (i.e. Windows. It's
useless on Unix). If not needed, this will be ignored.
Can you ignore it as well?
Maxim
Yup.
fread()
Read on
PHP.net/fread
PHP.net/fgets
...to learn how to manipulate files.
Maxim Maletsky
www.PHPBeginner.com
-Original Message-
From: Nikola Veber [mailto:[EMAIL PROTECTED]]
Sent: mercoledi 3 ottobre 2001 11.11
To: php forum
Subject: [PHP] file reading and textarea
Hi,
fopen let's you read the whole file. Try this
tutorials on files for a more hands on approach :
http://www.paphe.com/php/tutorials/111000.php
=
*
Know more about me:
http://www.geocities.com/mimodit
*
So sprach »[EMAIL PROTECTED]« am 2001-09-23 um 19:08:20 +0100 :
Is there any possibility to write to files as httpd
or system (which can write to files even with 000
permitions)?
With 000 permissions? Is system an alias for root? If not, then it's
not possible.
But normally the files
Maybe I wasn't clear in my previous message:
What I want to do is: when you fill the form, record it
to a file without 666 permitions. I mean: I don't want
to have the file opened to everybody. In Perl it was
possible (because it uses directly system user, which
is similar to root), I want to
im definitely not a guru, but perhaps this might help
http://www.php.net/manual/en/html/function.chmod.html
http://www.php.net/manual/en/html/function.chown.html
those are the doc pages on usage of similar process for setting permissions
(i believe)
GL
--
looks pretty straightforward with php's caveat to be careful to use octal...
chmod (/somedir/somefile, 0755); // octal; correct value of mode
--
-
Click here for Free Video!!
http://www.gohip.com/free_video/
[EMAIL PROTECTED] wrote in
You might mean \n.
Line:
$str = This\nis a\nsample
would output:
This
is a
sample
Did it help?
Niklas
-Original Message-
From: Nikola Weber [mailto:[EMAIL PROTECTED]]
Sent: 22. syyskuuta 2001 0:35
To: php forum
Subject: [PHP] file problem
Hi !
Thanks for the quick reply last
Thanks Much Martin!
--ccma
--snip--
good luck!
/Martin
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP General
On Fri, 7 Sep 2001, Gerard Samuel wrote:
Can a file be truncated from the beginning, and by x amount of lines??
Thanks
Truncated from the beginning? Do you mean truncate the file by X
lines, starting from the first position in the file, well, yeah:
?php
$fp = fopen(filename,
701 - 800 of 938 matches
Mail list logo