php-windows Digest 2 Nov 2002 06:39:35 -0000 Issue 1419
Topics (messages 16660 through 16686):
Re: Problem with php-script, possible a php.ini a fault....
16660 by: erythros
16661 by: Asendorf, John
16662 by: Michael Hazelden
16663 by: Svensson, B.A.T. (HKG)
16664 by: Asendorf, John
16665 by: Asendorf, John
16666 by: erythros
16671 by: neil smith
16684 by: Cam Dunstan
PHP behind a proxy server
16667 by: Thomas Keller
Re: Form text with reserved chars
16668 by: Dash McElroy
Re: file download .......
16669 by: Dash McElroy
Re: Download.php
16670 by: George Nicolae
ordering vars in an array
16672 by: DaMouse
16673 by: Dash McElroy
16674 by: erythros
16675 by: DaMouse
deleting files
16676 by: DaMouse
16677 by: Miha Nedok
Upload image file
16678 by: Shaun Thornburgh
16679 by: Asendorf, John
16681 by: Shaun Thornburgh
Re: sessions troubles on windows2000
16680 by: ashutosh
is_file() can't tell the difference between file and directory in Win32...
16682 by: Jack Kelly Dobson
16683 by: Miha Nedok
uploading help please
16685 by: marcelo
Please Guide me ( Unix and Windows Severs)
16686 by: Raheel Hussain
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
yeah turn globalvariables on....
"B.A.T. Svensson" <[EMAIL PROTECTED]> wrote in message
news:000c01c281bf$f2bca0a0$ce017c0a@;3-hkg-02-0028.lumc.nl...
> I have a problem with a php script. Every time I run it small
> (about 4 inches tall) green and pink illuminated goblins start
> to run around at my desktop. I tried to bash them with a bat,
> but it does not help they always comes back in numbers. My
> colleges says I make to much noise and need a vacation.
>
> Can I prevent this by setting some variables in php.ini?
>
> Has anybody else experienced this kind of problem before?
--- End Message ---
--- Begin Message ---
Yes. You need to set the goblin_init variable in the php.ini file to "Off"
usually these commands are set in the Header information which explains why
you are getting them whenever you open a page.
Before I found out about the php.ini field, I was using rat traps on them...
just set a line of them up along the front of your screen and they catch
most of them. This is helpful if you need to have goblin_init turned on for
some functionality.
---------------------
John Asendorf - [EMAIL PROTECTED]
Web Applications Developer
http://www.lcounty.com - NEW FEATURES ADDED DAILY!
Licking County, Ohio, USA
740-349-3631
Nullum magnum ingenium sine mixtura dementiae fuit
> -----Original Message-----
> From: Svensson, B.A.T. (HKG) [mailto:B.A.T.Svensson@;lumc.nl]
> Sent: Friday, November 01, 2002 11:02 AM
> To: Php-Windows (E-mail)
> Subject: [PHP-WIN] Problem with php-script, possible a php.ini a
> fault....
>
>
> I have a problem with a php script. Every time I run it small
> (about 4 inches tall) green and pink illuminated goblins start
> to run around at my desktop. I tried to bash them with a bat,
> but it does not help they always comes back in numbers. My
> colleges says I make to much noise and need a vacation.
>
> Can I prevent this by setting some variables in php.ini?
>
> Has anybody else experienced this kind of problem before?
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
Rat Traps?
What did you bate them with? I never found anything suitable!
-----Original Message-----
From: Asendorf, John [mailto:JAsendorf@;lcounty.com]
Sent: 01 November 2002 16:20
To: Svensson, B.A.T. (HKG); Php-Windows (E-mail)
Subject: RE: [PHP-WIN] Problem with php-script, possible a php.ini a
fault ....
Yes. You need to set the goblin_init variable in the php.ini file to "Off"
usually these commands are set in the Header information which explains why
you are getting them whenever you open a page.
Before I found out about the php.ini field, I was using rat traps on them...
just set a line of them up along the front of your screen and they catch
most of them. This is helpful if you need to have goblin_init turned on for
some functionality.
---------------------
John Asendorf - [EMAIL PROTECTED]
Web Applications Developer
http://www.lcounty.com - NEW FEATURES ADDED DAILY!
Licking County, Ohio, USA
740-349-3631
Nullum magnum ingenium sine mixtura dementiae fuit
> -----Original Message-----
> From: Svensson, B.A.T. (HKG) [mailto:B.A.T.Svensson@;lumc.nl]
> Sent: Friday, November 01, 2002 11:02 AM
> To: Php-Windows (E-mail)
> Subject: [PHP-WIN] Problem with php-script, possible a php.ini a
> fault....
>
>
> I have a problem with a php script. Every time I run it small
> (about 4 inches tall) green and pink illuminated goblins start
> to run around at my desktop. I tried to bash them with a bat,
> but it does not help they always comes back in numbers. My
> colleges says I make to much noise and need a vacation.
>
> Can I prevent this by setting some variables in php.ini?
>
> Has anybody else experienced this kind of problem before?
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
_____________________________________________________________________
This message has been checked for all known viruses by the
MessageLabs Virus Control Centre.
This message has been checked for all known viruses by the MessageLabs Virus Control
Centre.
*********************************************************************
Notice: This email is confidential and may contain copyright material of Ocado
Limited (the "Company"). Opinions and views expressed in this message may not
necessarily reflect the opinions and views of the Company.
If you are not the intended recipient, please notify us immediately and delete all
copies of this message. Please note that it is your responsibility to scan this
message for viruses.
Company reg. no. 3875000. Swallowdale Lane, Hemel Hempstead HP2 7PY
*********************************************************************
--- End Message ---
--- Begin Message ---
What functionality? Can you scare end users and the boss away?
> -----Original Message-----
> From: Asendorf, John [mailto:JAsendorf@;lcounty.com]
> Sent: Friday, November 01, 2002 5:20 PM
> To: Svensson, B.A.T. (HKG); Php-Windows (E-mail)
> Subject: RE: [PHP-WIN] Problem with php-script, possible a php.ini a
> fault....
>
>
> Yes. You need to set the goblin_init variable in the php.ini file to "Off"
>
> usually these commands are set in the Header information which explains why
> you are getting them whenever you open a page.
>
> Before I found out about the php.ini field, I was using rat traps on them...
> just set a line of them up along the front of your screen and they catch
> most of them. This is helpful if you need to have goblin_init turned on for
> some functionality.
>
> ---------------------
> John Asendorf - [EMAIL PROTECTED]
> Web Applications Developer
> http://www.lcounty.com - NEW FEATURES ADDED DAILY!
> Licking County, Ohio, USA
> 740-349-3631
> Nullum magnum ingenium sine mixtura dementiae fuit
>
>
> > -----Original Message-----
> > From: Svensson, B.A.T. (HKG) [mailto:B.A.T.Svensson@;lumc.nl]
> > Sent: Friday, November 01, 2002 11:02 AM
> > To: Php-Windows (E-mail)
> > Subject: [PHP-WIN] Problem with php-script, possible a php.ini a
> > fault....
> >
> >
> > I have a problem with a php script. Every time I run it small
> > (about 4 inches tall) green and pink illuminated goblins start
> > to run around at my desktop. I tried to bash them with a bat,
> > but it does not help they always comes back in numbers. My
> > colleges says I make to much noise and need a vacation.
> >
> > Can I prevent this by setting some variables in php.ini?
> >
> > Has anybody else experienced this kind of problem before?
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
--- End Message ---
--- Begin Message ---
They REALLY like sardines. I had a can of them that had been sitting on my
desk for about a week and they took right to them... that's how I found out!
---------------------
John Asendorf - [EMAIL PROTECTED]
Web Applications Developer
http://www.lcounty.com - NEW FEATURES ADDED DAILY!
Licking County, Ohio, USA
740-349-3631
Nullum magnum ingenium sine mixtura dementiae fuit
> -----Original Message-----
> From: Michael Hazelden [mailto:michael.hazelden@;ocado.com]
> Sent: Friday, November 01, 2002 11:23 AM
> To: 'Asendorf, John'; Svensson, B.A.T. (HKG); Php-Windows (E-mail)
> Subject: RE: [PHP-WIN] Problem with php-script, possible a php.ini a
> fault ....
>
>
> Rat Traps?
>
> What did you bate them with? I never found anything suitable!
>
> -----Original Message-----
> From: Asendorf, John [mailto:JAsendorf@;lcounty.com]
> Sent: 01 November 2002 16:20
> To: Svensson, B.A.T. (HKG); Php-Windows (E-mail)
> Subject: RE: [PHP-WIN] Problem with php-script, possible a php.ini a
> fault ....
>
>
> Yes. You need to set the goblin_init variable in the php.ini
> file to "Off"
>
> usually these commands are set in the Header information
> which explains why
> you are getting them whenever you open a page.
>
> Before I found out about the php.ini field, I was using rat
> traps on them...
> just set a line of them up along the front of your screen and
> they catch
> most of them. This is helpful if you need to have
> goblin_init turned on for
> some functionality.
>
> ---------------------
> John Asendorf - [EMAIL PROTECTED]
> Web Applications Developer
> http://www.lcounty.com - NEW FEATURES ADDED DAILY!
> Licking County, Ohio, USA
> 740-349-3631
> Nullum magnum ingenium sine mixtura dementiae fuit
>
>
> > -----Original Message-----
> > From: Svensson, B.A.T. (HKG) [mailto:B.A.T.Svensson@;lumc.nl]
> > Sent: Friday, November 01, 2002 11:02 AM
> > To: Php-Windows (E-mail)
> > Subject: [PHP-WIN] Problem with php-script, possible a php.ini a
> > fault....
> >
> >
> > I have a problem with a php script. Every time I run it small
> > (about 4 inches tall) green and pink illuminated goblins start
> > to run around at my desktop. I tried to bash them with a bat,
> > but it does not help they always comes back in numbers. My
> > colleges says I make to much noise and need a vacation.
> >
> > Can I prevent this by setting some variables in php.ini?
> >
> > Has anybody else experienced this kind of problem before?
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> _____________________________________________________________________
> This message has been checked for all known viruses by the
> MessageLabs Virus Control Centre.
>
> This message has been checked for all known viruses by the
> MessageLabs Virus Control Centre.
>
>
> *********************************************************************
>
> Notice: This email is confidential and may contain copyright
> material of Ocado Limited (the "Company"). Opinions and views
> expressed in this message may not necessarily reflect the
> opinions and views of the Company.
> If you are not the intended recipient, please notify us
> immediately and delete all copies of this message. Please
> note that it is your responsibility to scan this message for viruses.
>
> Company reg. no. 3875000. Swallowdale Lane, Hemel Hempstead HP2 7PY
>
> *********************************************************************
>
--- End Message ---
--- Begin Message ---
They also can explain away bite marks to your wife. "Honey, I SWEAR... it
was the goblins who gave me that bite mark on my neck... no, uh... I don't
KNOW why the goblins were wearing lipstick!"
---------------------
John Asendorf - [EMAIL PROTECTED]
Web Applications Developer
http://www.lcounty.com - NEW FEATURES ADDED DAILY!
Licking County, Ohio, USA
740-349-3631
Nullum magnum ingenium sine mixtura dementiae fuit
> -----Original Message-----
> From: Svensson, B.A.T. (HKG) [mailto:B.A.T.Svensson@;lumc.nl]
> Sent: Friday, November 01, 2002 11:36 AM
> To: Asendorf, John; Php-Windows (E-mail)
> Subject: RE: [PHP-WIN] Problem with php-script, possible a php.ini a
> fault....
>
>
> What functionality? Can you scare end users and the boss away?
>
> > -----Original Message-----
> > From: Asendorf, John [mailto:JAsendorf@;lcounty.com]
> > Sent: Friday, November 01, 2002 5:20 PM
> > To: Svensson, B.A.T. (HKG); Php-Windows (E-mail)
> > Subject: RE: [PHP-WIN] Problem with php-script, possible a php.ini a
> > fault....
> >
> >
> > Yes. You need to set the goblin_init variable in the
> php.ini file to "Off"
> >
> > usually these commands are set in the Header information
> which explains why
> > you are getting them whenever you open a page.
> >
> > Before I found out about the php.ini field, I was using rat
> traps on them...
> > just set a line of them up along the front of your screen
> and they catch
> > most of them. This is helpful if you need to have
> goblin_init turned on for
> > some functionality.
> >
> > ---------------------
> > John Asendorf - [EMAIL PROTECTED]
> > Web Applications Developer
> > http://www.lcounty.com - NEW FEATURES ADDED DAILY!
> > Licking County, Ohio, USA
> > 740-349-3631
> > Nullum magnum ingenium sine mixtura dementiae fuit
> >
> >
> > > -----Original Message-----
> > > From: Svensson, B.A.T. (HKG) [mailto:B.A.T.Svensson@;lumc.nl]
> > > Sent: Friday, November 01, 2002 11:02 AM
> > > To: Php-Windows (E-mail)
> > > Subject: [PHP-WIN] Problem with php-script, possible a php.ini a
> > > fault....
> > >
> > >
> > > I have a problem with a php script. Every time I run it small
> > > (about 4 inches tall) green and pink illuminated goblins start
> > > to run around at my desktop. I tried to bash them with a bat,
> > > but it does not help they always comes back in numbers. My
> > > colleges says I make to much noise and need a vacation.
> > >
> > > Can I prevent this by setting some variables in php.ini?
> > >
> > > Has anybody else experienced this kind of problem before?
> > >
> > > --
> > > PHP Windows Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> >
>
--- End Message ---
--- Begin Message ---
try sloppy code. it works every time, they love it!
"Michael Hazelden" <[EMAIL PROTECTED]> wrote in message
news:C1260EE72F22C44F833D033A17524AD7016A7024@;lhoexc1...
> Rat Traps?
>
> What did you bate them with? I never found anything suitable!
>
> -----Original Message-----
> From: Asendorf, John [mailto:JAsendorf@;lcounty.com]
> Sent: 01 November 2002 16:20
> To: Svensson, B.A.T. (HKG); Php-Windows (E-mail)
> Subject: RE: [PHP-WIN] Problem with php-script, possible a php.ini a
> fault ....
>
>
> Yes. You need to set the goblin_init variable in the php.ini file to
"Off"
>
> usually these commands are set in the Header information which explains
why
> you are getting them whenever you open a page.
>
> Before I found out about the php.ini field, I was using rat traps on
them...
> just set a line of them up along the front of your screen and they catch
> most of them. This is helpful if you need to have goblin_init turned on
for
> some functionality.
>
> ---------------------
> John Asendorf - [EMAIL PROTECTED]
> Web Applications Developer
> http://www.lcounty.com - NEW FEATURES ADDED DAILY!
> Licking County, Ohio, USA
> 740-349-3631
> Nullum magnum ingenium sine mixtura dementiae fuit
>
>
> > -----Original Message-----
> > From: Svensson, B.A.T. (HKG) [mailto:B.A.T.Svensson@;lumc.nl]
> > Sent: Friday, November 01, 2002 11:02 AM
> > To: Php-Windows (E-mail)
> > Subject: [PHP-WIN] Problem with php-script, possible a php.ini a
> > fault....
> >
> >
> > I have a problem with a php script. Every time I run it small
> > (about 4 inches tall) green and pink illuminated goblins start
> > to run around at my desktop. I tried to bash them with a bat,
> > but it does not help they always comes back in numbers. My
> > colleges says I make to much noise and need a vacation.
> >
> > Can I prevent this by setting some variables in php.ini?
> >
> > Has anybody else experienced this kind of problem before?
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> _____________________________________________________________________
> This message has been checked for all known viruses by the
> MessageLabs Virus Control Centre.
>
> This message has been checked for all known viruses by the MessageLabs
Virus Control Centre.
>
>
> *********************************************************************
>
> Notice: This email is confidential and may contain copyright material of
Ocado Limited (the "Company"). Opinions and views expressed in this message
may not necessarily reflect the opinions and views of the Company.
> If you are not the intended recipient, please notify us immediately and
delete all copies of this message. Please note that it is your
responsibility to scan this message for viruses.
>
> Company reg. no. 3875000. Swallowdale Lane, Hemel Hempstead HP2 7PY
>
> *********************************************************************
--- End Message ---
--- Begin Message ---
Hahahaha :-)
An I have a problem, my php interpreter dont mak da coffee even when I
shout 'brew up you bastard!'
Anybody know what n prb is, plz ?
Thx a million guyz
LOL
At 16:01 01/11/2002 +0000, you wrote:
From: "Svensson, B.A.T. (HKG)" <[EMAIL PROTECTED]>
To: "Php-Windows (E-mail)" <[EMAIL PROTECTED]>
Date: Fri, 1 Nov 2002 17:01:33 +0100
Message-ID: <000c01c281bf$f2bca0a0$[EMAIL PROTECTED]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Subject: Problem with php-script, possible a php.ini a fault....
I have a problem with a php script. Every time I run it small
(about 4 inches tall) green and pink illuminated goblins start
to run around at my desktop. I tried to bash them with a bat,
but it does not help they always comes back in numbers. My
colleges says I make to much noise and need a vacation.
Can I prevent this by setting some variables in php.ini?
Has anybody else experienced this kind of problem before?
--- End Message ---
--- Begin Message ---
----- Original Message -----
From: "Michael Hazelden" <[EMAIL PROTECTED]>
To: "'Asendorf, John'" <[EMAIL PROTECTED]>; "Svensson, B.A.T. (HKG)"
<[EMAIL PROTECTED]>; "Php-Windows (E-mail)" <[EMAIL PROTECTED]>
Sent: Saturday, November 02, 2002 3:23 AM
Subject: RE: [PHP-WIN] Problem with php-script, possible a php.ini a fault
....
> Rat Traps?
>
> What did you bate them with? I never found anything suitable!
Yes, Use a nested if else statement 10 deep using only $$ variable variables
and ODBC drivers to read a .NET enabled Access table COM object running on
Windows Millenium second edition service pack 128 - guaranteed to catch
ANYTHING and stop em cold mate.
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
Hello there!
I've set up a Win2k server with IIS and MySQL 3.23.52. This server is an
internal server whose internet connection is routed through a proxy server
running on port 9090 of some other server.
A few of my scripts I ported on this machine now require an internet
connection (get_meta_tags, gethostbyaddr,...), which fails since I didn't
find any way to configure php for my proxy server.
I would be very pleased if you could help me!
Thanks in advance,
Thomas Keller.
T-Systems Berkom, Germany
--
--
<tommyD>
<public availlable="only when I'm online">www.thomaskeller.tk </public>
<private availlable="only in german">www.seelenstriptease.net </private>
</tommyD>
--- End Message ---
--- Begin Message ---
Or, to strip slashes off a specific variable (set_magic_quotes will affect
all variables) try:
$text = stripslashes($text);
-Dash
-----Original Message-----
From: Miha Nedok [mailto:mike@;voyager.unix-systems.net]
Sent: Friday, November 01, 2002 5:00 AM
To: news.php.net
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] Form text with reserved chars
Try set_magic_quotes_runtime(0) to get rid off \ .
Cheers
On Fri, 1 Nov 2002, news.php.net wrote:
> Date: Fri, 1 Nov 2002 08:37:50 +0100
> From: news.php.net <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Form text with reserved chars
>
> Hi NG.
>
> I'm having trouble with form textareas containing " ' ". Every time I sub=
mit
> a form holding this char php will insert "\" infront of it.
> I'm well aware of the reason for this but I'd like to know just how to ge=
t
> rid of the "\".
>
> I've tried using ereg_replace("'","=B4",$text) but the "\" is inserted th=
e
> very second submit is invoked.
>
> How do I get rid of the "\" or "\'" when I want to show the text the form
> field was holding?
>
> Also, I'd like to know if there is a smart way of replacing "spaces" and
> "new line" in the text with the html code for this. Aka to make the view
> exactly as it was typed in the field.
>
> If anyone can help me with this it would be very much apreciated.
>
> Regards
> ~ Aidal
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Toby,
Look at this page: http://www.php.net/manual/en/function.header.php (excerpt
below)
If you want the user to be prompted to save the data you are sending, such
as a generated PDF file, you can use the Content-Disposition header to
supply a recommended filename and force the browser to display the save
dialog.
<?php
// We'll be outputting a PDF
header("Content-type: application/pdf");
// It will be called downloaded.pdf
header("Content-Disposition: attachment; filename=downloaded.pdf");
// The PDF source is in original.pdf
readfile('original.pdf');
?>
Note: There is a bug in Microsoft Internet Explorer 4.01 that prevents
this from working. There is no workaround. There is also a bug in Microsoft
Internet Explorer 5.5 that interferes with this, which can be resolved by
upgrading to Service Pack 2 or later.
-Dash
-----Original Message-----
From: toby z [mailto:blue_myth_1@;yahoo.com]
Sent: Friday, November 01, 2002 3:45 AM
To: php hlp list
Subject: [PHP-WIN] file download .......
hi guyz
im tryin to let a user download a file
when he clicks on the link a open from location or
save to disk dialog should appear
n i dont know how to do this
can n will sumbdy plz help
thnx a million
toby .....
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
take a look at the header() function at
http://www.php.net/manual/en/function.header.php
--
Best regards,
George Nicolae
IT Manager
___________________
PaginiWeb.com - Professional Web Design
www.PaginiWeb.com
"Damouse" <[EMAIL PROTECTED]> wrote in message
news:003201c281b5$78074040$3700a8c0@;DaMouse...
Is there a way to make a download start via a script I have several
downloads
and I'd like them to be download.php?id=0 etc, any ideas
-DaMouse
Ensign Baker
HCO Officer
USS Atlantis
--- End Message ---
--- Begin Message ---
right I've got an array full of integers
0,6,7,8,9,10
only problem is because I grabbed these out of a
directory list they are ordered
0,10,6,7,8,9 anyone got an idea how to rearrange
the array to make them go the correct way
![O]() Ensign Baker HCO
Officer USS Atlantis
|
--- End Message ---
--- Begin Message ---
Try sort (http://www.php.net/manual/en/function.sort.php
<http://www.php.net/manual/en/function.sort.php> ). You're sorting numbers,
so you'd probably want to do this:
$array = sort($array, SORT_NUMERIC);
-Dash
-----Original Message-----
From: DaMouse [mailto:damouse@;ntlworld.com]
Sent: Friday, November 01, 2002 12:15 PM
To: PHP - Win
Subject: [PHP-WIN] ordering vars in an array
right I've got an array full of integers 0,6,7,8,9,10
only problem is because I grabbed these out of a directory list they are
ordered
0,10,6,7,8,9 anyone got an idea how to rearrange the array to make them go
the correct way
O
Ensign Baker
HCO Officer
USS Atlantis
--- End Message ---
--- Begin Message ---
check this out dude http://www.php.net/manual/en/function.natsort.php
"Damouse" <[EMAIL PROTECTED]> wrote in message
news:00e201c281e3$5fe074e0$3700a8c0@;DaMouse...
right I've got an array full of integers 0,6,7,8,9,10
only problem is because I grabbed these out of a directory list they are ordered
0,10,6,7,8,9 anyone got an idea how to rearrange the array to make them go the
correct way
Ensign Baker
HCO Officer
USS Atlantis
--- End Message ---
--- Begin Message ---
Thanks peeps for you time I think I'll use sort since they're already
integers
----- Original Message -----
From: Dash McElroy <[EMAIL PROTECTED]>
To: 'DaMouse' <[EMAIL PROTECTED]>; PHP - Win <[EMAIL PROTECTED]>
Sent: Friday, November 01, 2002 9:02 PM
Subject: RE: [PHP-WIN] ordering vars in an array
> Try sort (http://www.php.net/manual/en/function.sort.php
> <http://www.php.net/manual/en/function.sort.php> ). You're sorting
numbers,
> so you'd probably want to do this:
>
> $array = sort($array, SORT_NUMERIC);
>
> -Dash
>
> -----Original Message-----
> From: DaMouse [mailto:damouse@;ntlworld.com]
> Sent: Friday, November 01, 2002 12:15 PM
> To: PHP - Win
> Subject: [PHP-WIN] ordering vars in an array
>
>
> right I've got an array full of integers 0,6,7,8,9,10
> only problem is because I grabbed these out of a directory list they are
> ordered
> 0,10,6,7,8,9 anyone got an idea how to rearrange the array to make them go
> the correct way
>
> O
> Ensign Baker
> HCO Officer
> USS Atlantis
>
>
--- End Message ---
--- Begin Message ---
how do you delete files in php?
![O]() Ensign Baker HCO
Officer USS Atlantis
|
--- End Message ---
--- Begin Message ---
Look for unlink() .
Mike
On Fri, 1 Nov 2002, DaMouse wrote:
> Date: Fri, 1 Nov 2002 21:19:47 -0000
> From: DaMouse <[EMAIL PROTECTED]>
> To: PHP - Win <[EMAIL PROTECTED]>
> Subject: [PHP-WIN] deleting files
>
> how do you delete files in php?
>
>
> Ensign Baker
> HCO Officer
> USS Atlantis
>
--- End Message ---
--- Begin Message ---
I am attempting to upload image files to the server from a users browser
using the following code, however, the images seem to get corrupted, they
look completely different and the file sizes are generally smaller, also it
sometimes says file upload unsuccessful, even when it does upload the file?
Any ideas?
Thank you
//copy image to server
if ($image != "none") {
if (copy ($image, $dir.$image_name)){
echo "<p>File upload successful!</p>";
} else {
echo "<p>File upload unsuccessful!</p>";
}
//new name of image
$new_name = "$property_id-$category_id-$sub_category_id.jpg";
//rename the file
rename($dir.$image_name, $dir.$new_name);
}
--- End Message ---
--- Begin Message ---
Throw some debugging echoes in there to show you what the file names and
directories are looking like.
---------------------
John Asendorf - [EMAIL PROTECTED]
Web Applications Developer
http://www.lcounty.com - NEW FEATURES ADDED DAILY!
Licking County, Ohio, USA
740-349-3631
Nullum magnum ingenium sine mixtura dementiae fuit
> -----Original Message-----
> From: Shaun Thornburgh [mailto:shaun@;mania.plus.com]
> Sent: Friday, November 01, 2002 4:38 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Upload image file
>
>
> I am attempting to upload image files to the server from a
> users browser
> using the following code, however, the images seem to get
> corrupted, they
> look completely different and the file sizes are generally
> smaller, also it
> sometimes says file upload unsuccessful, even when it does
> upload the file?
>
> Any ideas?
>
> Thank you
>
> //copy image to server
> if ($image != "none") {
> if (copy ($image, $dir.$image_name)){
> echo "<p>File upload successful!</p>";
> } else {
> echo "<p>File upload unsuccessful!</p>";
> }
>
> //new name of image
> $new_name = "$property_id-$category_id-$sub_category_id.jpg";
>
> //rename the file
> rename($dir.$image_name, $dir.$new_name);
> }
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
Thanks for your reply,
it works fine if i upload one image, but if attempt upload another image
(with a defferent name) to the same directory it uploads half or less than
half of the image, have you got any iedas why this is happening?
"John Asendorf" <[EMAIL PROTECTED]> wrote in message
news:8A1B14582FF6D511A5DF00B0D0220374B49C79@;exchange.lcounty.com...
> Throw some debugging echoes in there to show you what the file names and
> directories are looking like.
>
> ---------------------
> John Asendorf - [EMAIL PROTECTED]
> Web Applications Developer
> http://www.lcounty.com - NEW FEATURES ADDED DAILY!
> Licking County, Ohio, USA
> 740-349-3631
> Nullum magnum ingenium sine mixtura dementiae fuit
>
>
> > -----Original Message-----
> > From: Shaun Thornburgh [mailto:shaun@;mania.plus.com]
> > Sent: Friday, November 01, 2002 4:38 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-WIN] Upload image file
> >
> >
> > I am attempting to upload image files to the server from a
> > users browser
> > using the following code, however, the images seem to get
> > corrupted, they
> > look completely different and the file sizes are generally
> > smaller, also it
> > sometimes says file upload unsuccessful, even when it does
> > upload the file?
> >
> > Any ideas?
> >
> > Thank you
> >
> > //copy image to server
> > if ($image != "none") {
> > if (copy ($image, $dir.$image_name)){
> > echo "<p>File upload successful!</p>";
> > } else {
> > echo "<p>File upload unsuccessful!</p>";
> > }
> >
> > //new name of image
> > $new_name = "$property_id-$category_id-$sub_category_id.jpg";
> >
> > //rename the file
> > rename($dir.$image_name, $dir.$new_name);
> > }
> >
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
--- End Message ---
--- Begin Message ---
me also same problem
Mark Anderson <[EMAIL PROTECTED]> wrote in message
news:47CF48E973DA9084B9A11885799D447A@;markblaster.medscape.com...
> Hi!
>
> I'm running Apache/1.3.24 (Win32) and php 4.2.1 as a apache module on
> a windows2000 professional box. everything seems to be fine but
> sessions. The problem is that although it's able to write the session
> information in the php/tmp directory were it's suppouse to write the
> information related to session ID's and the registered variables, is
> not able to read cookies from the clients. Even if i use the session
> identifier in the URL to avoid cookies the server is not able to keep
> track of sessions. I've check in detail the php.ini file and tried
> almost anything.
>
> Can anyone give some help? Thanks in advance.
>
>
>
>
> Sent by Medscape Mail: Free Portable E-mail for Professionals on the Move
> http://www.medscape.com
--- End Message ---
--- Begin Message ---
Hello,
This is the first time I've worked with these functions so I'm sure it's in
Indian, not the arrows.
This script identifies both files and directories as directories. What am I
doing wrong here?
I'm running as a .dll under IIS.
<?
function Get_Directory_Listing($path) {
if ($dir_handle = opendir($path)) {
while ($file = readdir($dir_handle)) {
if (($file != ".") && ($file != "..")) {
if (is_file($file)) {
print($file . " is a file.<BR>");
}
else {
print($file . " is a directory.<BR>");
}
}
}
closedir($dir_handle);
}
}
Get_Directory_Listing("/my_path");
?>
Thanks j-
--- End Message ---
--- Begin Message ---
I had similar problems. Use strcmp() with .. and . .
Or use filetype() to determine if it is a file or directory or ...
Mike
On Fri, 1 Nov 2002, Jack Kelly Dobson wrote:
> Date: Fri, 1 Nov 2002 16:39:55 -0600
> From: Jack Kelly Dobson <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] is_file() can't tell the difference between file and
> directory in Win32...
>
> Hello,
>
> This is the first time I've worked with these functions so I'm sure it's in
> Indian, not the arrows.
>
> This script identifies both files and directories as directories. What am I
> doing wrong here?
>
> I'm running as a .dll under IIS.
>
> <?
> function Get_Directory_Listing($path) {
> if ($dir_handle = opendir($path)) {
> while ($file = readdir($dir_handle)) {
> if (($file != ".") && ($file != "..")) {
> if (is_file($file)) {
> print($file . " is a file.<BR>");
> }
> else {
> print($file . " is a directory.<BR>");
> }
> }
> }
> closedir($dir_handle);
> }
> }
> Get_Directory_Listing("/my_path");
> ?>
>
> Thanks j-
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
Hi need some help please
What is wrong with my code?
it is supposed to upload 2 files but instead gives me this error
Warning: Unable to open 'Array' for reading
The code:
<html>
<head>
<title>O Leme upload</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?php
$PHP_SELF = $_SERVER['PHP_SELF'];
$page = $_REQUEST['page'];
$origem = $_FILES['origem'];
$origem2 = $_FILES['origem2'];
switch($page)
{
case "um":
um($origem ,$origem2);
break;
case "dois":
dois($origem, $origem2);
break;
default:
um($origem ,$origem2);
break;
}
function um($origem ,$origem2)
{
?>
<title>Jornal O Leme</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#006699">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="100%" height="70" valign="top"><img src="test.jpg"
width="600" height="120">
</td>
</tr>
<tr>
<td height="262" valign="top"><p> </p>
<form method="post" action="<?php $PHP_SELF ?>"
enctype="multipart/form-data">
<table width="75%" border="0" align="center" bgcolor="#FFFFFF">
<tr>
<td width="23%"><div align="center"><font face="BankGothic Md
BT">
</font></div></td>
<td width="77%" bgcolor="#FFFFFF"> </td>
</tr>
<tr>
<td><div align="center"></div></td>
<td bgcolor="#FFFFFF"> </td>
</tr>
<tr>
<td><div align="center"></div></td>
<td bgcolor="#FFFFFF"> </td>
</tr>
<tr>
<td><div align="left"><strong>Imagem pequena</strong></div></td>
<td bgcolor="#FFFFFF"> <input type=hidden name=MAX_FILE_SIZE
value=102400>
<input type="File" name="origem"> </td>
</tr>
<tr>
<td><div align="left"><strong>Imagem grande</strong></div></td>
<td bgcolor="#FFFFFF"><input type=hidden name=MAX_FILE_SIZE
value=102400>
<input type="File" name="origem2"> </td>
</tr>
<tr>
<td><div align="center"></div></td>
<td bgcolor="#FFFFFF"> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
</table>
<p align="center">
<input name="submit" type="submit" value="Adicionar">
<input type="hidden" name="page" value="dois">
</form></p>
</td>
</tr>
<tr>
<td height="81" valign="top"><div align="center">
<p> </p>
<p>
<?php
include ('menu.php');
?>
</p>
</div></td>
</tr>
</table>
<?php
}
function dois($origem, $origem2)
{
set_time_limit(60);
$path=(dirname($PATH_TRANSLATED))."../primeirapagina/";
$origem_name="pppv2.jpg";
$dest= $path.$origem_name;
if (($origem <> "none") && ($origem <> "")){
if (copy($origem,$dest)){;
} else {
echo "directoria sem direitos de escrita <br>";
}
unlink ($origem);
}
set_time_limit(60);
$path2=(dirname($PATH_TRANSLATED))."../primeirapagina/";
$origem2_name="ppv2.jpg";
$dest2= $path2.$origem2_name;
if (($origem2 <> "none") && ($origem2 <> "")){
if (copy($origem2,$dest2)){;
} else {
echo "directoria sem direitos de escrita <br>";
}
unlink ($origem2);
}
}
?>
</body>
</html>
and yes i am new to php
tk
--- End Message ---
--- Begin Message ---
hi,
I m working on a site which is to be hosted on a unix or linux server, but the idea
which i don't have
is the difference between the unix/linux and windows server,
i wonder there is no difference in the php scripts, but the only difference will be
the configuration of
php on windows and unix/linux.
plz correct me if i m wrong
the other confusion which i have in my mind is , the standard configuration of php in
various
windows and Linux/Unix servers about the "session.auto_start" is it set to 1 or 0
this is i m asking because i have never hosting a site designed in php but a lot of
sites in ASP
, in asp there is always session is autostart. so ,
If i m developing a site on my local sever ( My PC ) with the configuration of
session.auto_start=1
then if i host it, it might create error, because
when i set ( session.auto_start=0) and wrote session_start(); on each page explicitly,
it was creating
a lot of errors, so i set (session.auto_start=1) and worked fine.
plz guide me.
---------------------------------
Do you Yahoo!?
HotJobs - Search new jobs daily now
--- End Message ---