Hi everyone.
I asked this a week or so ago but i am unsure if it got to the list, so here
we go again.
I am trying to get a remote file to be copied onto my own web server, I have
looked at fopen() and fread() and fwrite() and get the general idea of each,
but im wondering how to join the
Everything you need:
http://www.php.net/ftp
Adam Voigt
[EMAIL PROTECTED]
On Tue, 2002-10-01 at 11:50, Simon Angell wrote:
Hi everyone.
I asked this a week or so ago but i am unsure if it got to the list, so here
we go again.
I am trying to get a remote file to be copied onto my own web
Simon Angell wrote:
Hi everyone.
I asked this a week or so ago but i am unsure if it got to the list, so here
we go again.
I am trying to get a remote file to be copied onto my own web server, I have
looked at fopen() and fread() and fwrite() and get the general idea of each,
but im
i tried that ine and got this...
Warning: fopen(/test/canberra.txt, w+) - No such file or directory in
C:\Xitami\webpages\bomonster\test2.php on line 4
code..
?php
$rContents = implode( \n, file(
'ftp://ftp.bom.gov.au/anon/gen/fwo/IDN10035.txt' ) );
if( ($fp = fopen( '/test/canberra.txt', 'w+'
You're a Windows guy so probably you need the directory delimiters facing
the other way :)
Try this one (not tested AT ALL):
$rContents = implode( \n, file( 'ftp://www.foo.bar/me/my/data.txt' ) );
if( ($fp = fopen( 'c:\path\to\directory\outfile.txt', 'wb+' )) !== false )
{
fputs( $fp,
i removed a / and it worked :)
?php
$rContents = implode( \n, file(
'ftp://ftp.bom.gov.au/anon/gen/fwo/IDN10035.txt' ) );
if( ($fp = fopen( 'test/canberratest.txt', 'w+' )) !== false )
{
fputs( $fp, $rContents );
fclose( $fp );
}
?
Now the format of the content is no longer, can this be
Windows makes me cry... this will fix the problem...
Change: $rContents = implode( \n, file(
'ftp://ftp.bom.gov.au/anon/gen/fwo/IDN10035.txt' ) );
To: $rContents = implode( \r\n, file(
'ftp://ftp.bom.gov.au/anon/gen/fwo/IDN10035.txt' ) );
If that doesn't work:
To: $rContents =
Thanks for that Robert *it works*, now i have 1 more problem, after
uploading to my web server i get this...
Warning: fopen(wtest.txt, wb+) - Permission denied in
/home/canberra/public_html/bomonster/canberra.php on line 6
Dunno why either, the directory is not protected, can you help me with
hey people,
I have been seeing something in a few php scripts i've been playing with and
i really dont know what it means or does. I'm only new to php so maybe
someone could explain.
i have been seeing -...e.g. while($file = $dir - read())
what does the - mean and do.
thanks heaps
--
PHP
basically it is used for accessing a variable in an array.
Adam
On Wed, 14 Aug 2002, Chris Barnes wrote:
hey people,
I have been seeing something in a few php scripts i've been playing with and
i really dont know what it means or does. I'm only new to php so maybe
I'm currently developing a Remote CMS for a site.
I'm working on the image upload and want to create a smaller thumbnail type
image (thought 200x180 instead of 50x50)
I know I'm going to need either imagecopyresize() or imagecopyresample(). I
don't know which would be better for this purpose
On Wednesday 24 July 2002 15:48, Nicholas Mercier wrote:
I'm currently developing a Remote CMS for a site.
I'm working on the image upload and want to create a smaller thumbnail type
image (thought 200x180 instead of 50x50)
I know I'm going to need either imagecopyresize() or
I have a form, and if someone doesnt fill in a field it returns and asks them to
filling in the
missing field. I have made it so that the person doesnt lose everything, currently
they will lose
radio button information or checkbox information. Can someone tell me how to best
keep it so the
Quick answer:
input type=checkbox name=name value=value?= (
$HTTP_POST_VARS['name']=='value' ? ' checked' : '' ) ?
the same for radio boxes.
Dan McCullough wrote:
I have a form, and if someone doesnt fill in a field it returns and asks them to
filling in the
missing field. I have made it
Subject: [PHP] Quick question
I have a form, and if someone doesnt fill in a field it returns and asks
them to filling in the
missing field. I have made it so that the person doesnt lose everything,
currently they will lose
radio button information or checkbox information. Can someone tell me how
When you define a new class can you do the following?
$className = Parent;
class $className {
};
Thanks!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
You need to call new operator to create the object.
Thank you,
RAY HUNTER
-Original Message-
From: Jay [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 2:22 PM
To: Php-General (E-mail)
Subject: [PHP] Quick Question about Classes
When you define a new class can you do
-Original Message-
From: Erik Price [mailto:[EMAIL PROTECTED]]
Sent: 10 January 2002 15:44
I thought that $_GET[] and $_POST[] could be used in place of regular
variables... that is,
$sql = SELECT * FROM tablename WHERE
tablename.column=$_GET['criteria_integer'];
but
$sql = SELECT * FROM tablename WHERE
tablename.column=$_GET['criteria_integer'];
but unfortunately, this isn't working.
On a related note, outside of strings one should always surround keys with
quotes, so:
$arr = array('a' = 'apple', 'b' = 'banana');
print $arr['a']; // apple
On Friday, January 11, 2002, at 06:05 AM, Ford, Mike [LSS] wrote:
Incidentally, I've occasionally had problems including a variable name
containing an underscore in a double-quoted string (e.g. $num_recs
records retrieved), where PHP tries to insert the value of $num
followed by the
It seems that you are saying that not using quotes is bad (first), but
then later you show that omitting the quotes does not result in an error.
Or are you saying that the quotes can be omitted if the array element is
being used in a string (between quotes), but generally the quotes around
the
-Original Message-
From: Erik Price [mailto:[EMAIL PROTECTED]]
Sent: 09 January 2002 19:22
I'm trying to write my code in accordance with the PHP 4.1.0 security
advisory -- that is, I want to use the $_GET and $_POST arrays when
grabbing variables passed with GET and POST forms.
I thought that $_GET[] and $_POST[] could be used in place of regular
variables... that is,
$sql = SELECT * FROM tablename WHERE
tablename.column=$_GET['criteria_integer'];
but unfortunately, this isn't working.
On Thursday, January 10, 2002, at 08:18 AM, Ford, Mike [LSS] wrote:
I thought that $_GET[] and $_POST[] could be used in place of regular
variables... that is,
$sql = SELECT * FROM tablename WHERE
tablename.column=$_GET['criteria_integer'];
but unfortunately, this isn't working. It resulted in the following
error message in the browser:
Parse error: parse
Yes, but $sql is passed to the database, which has no understanding of
$_GET. Will it take PHP that much longer to make this assignment:
$criteria_integer = $_GET['criteria_integer'];
With the benefit that the SQL is much easier to read
$sql = SELECT * FROM tablename WHERE
Erik,
Although, I've not proved this I think the PHP parser gets confused when
it sees a complex variable reference, $_GET[ 'criteria_integer' ]
embedded within double quotes. I've run into similar error messages so
I've been breaking out the variable from the double quotes as follows:
$sql =
Just a quick question -- I'm temporarily unsubbed so if anyone could CC
me directly that would be great.
I'm trying to write my code in accordance with the PHP 4.1.0 security
advisory -- that is, I want to use the $_GET and $_POST arrays when
grabbing variables passed with GET and POST forms.
Hello, I have png/jpeg support and gd 1.8.3
I see, however, some linux ./configure examples that just use
--with-gd and no
--with=/usr/local/png or whatever
the question is, would
--with-gd be enough to create/add text to jpeg/png or *only* if they are
included?
Just want to double check
I have a form with checkboxes and they have a name of associate_id. How
can I call these variables (or other ideas of getting ID numbers from check
boxes)? In PERL i know you can use ${associate_.$id} but I cant seem to
find the equivalent for PHP. I could then get a list of id's and check if
, December 12, 2001 1:27 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Quick Question about Variables
I have a form with checkboxes and they have a name of associate_id. How
can I call these variables (or other ideas of getting ID numbers from check
boxes)? In PERL i know you can use ${associate_.$id} but I
I want to show a default piece of information if my query returns no result, and what
I mean by no
result is the query for a store in a certain state doesnt exist.
thanks
dan
=
Dan McCullough
---
Theres no such thing as a
I was just wondering if I could call some functions out side of the class
I'm making? The reason why I want to do this is so that I don't have to
rewrite the functions as methods in the class and I don't want to get too
far into what I'm doing before I find out it doesn't work.
Thanks,
Jay
--
: I was just wondering if I could call some functions out side of the class
: I'm making? The reason why I want to do this is so that I don't have to
: rewrite the functions as methods in the class and I don't want to get too
: far into what I'm doing before I find out it doesn't work.
Sure
Hi Romulo Roberto Pereira,
Wednesday, May 09, 2001, 7:11:38 AM, you wrote:
Romulo Hello!
Romulo Just a quick ot question:
Romulo From a php script I open a frameset this divides the browser window in two
Romulo rows. How do I do to get rid of the frameset without closing the window?
try a link
Hello!
Just a quick ot question:
From a php script I open a frameset this divides the browser window in two
rows. How do I do to get rid of the frameset without closing the window?
TIA
Rom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
Hello!
I have one script that has a bunch of checkboxes in a form, all them with
different names. As you know the form only submit the ones that are
checked. I would like to know witch ones the user checked (they will come in
the path as variables I suppose) because I need to make a sum of the
101 - 136 of 136 matches
Mail list logo