Petrus Bastos wrote:
system("/usr/local/bin/zip -P t.zip biblioteca.php",$ret_val);
Try a full path . here - ^&^^
that's my code and even zip with full path, return $ret_val = 127;
AFAIK that's the error code for "command not found" which probably means
PHP
[snip]
> http://www.php.net/flush
Huh, what?!?! to both of you:
[/snip]
My bad...I had a total brain fart and 'combined' some concepts that I
was speaking to someone about off-list.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
In your php code you'll need the full path to biblioteca.php and to
t.zip and the web user will need write permissions to the dir where you
create t.zip.
-Shawn
Petrus Bastos wrote:
> Wolf,
>
> I'm sure actually working from the command line.
>
> > /usr/local/bin/zip -P t.zip biblioteca.
Shawn McKenzie wrote:
>> What part of my example was unclear?
>>
>>
> All of it, since I posted just a couple minutes after you and I hadn't
> seen your post yet.
>
>
I'm sorry, I thought were were responding WHAT?!? to me.
I'm going to blame thunderbird for looking like you responded to m
Nick Stinemates wrote:
> Shawn McKenzie wrote:
>> Jay Blanchard wrote:
>>
>>> [snip]
>>> if i declare an instance of a class in the top of my php file, then
>>> have html, then later on user $myClassInstance->myMethod(); --
>>> myMethod() does not execute, only when i have the instantiation
Nick Stinemates wrote:
> Shawn McKenzie wrote:
>>> What part of my example was unclear?
>>>
>>>
>> All of it, since I posted just a couple minutes after you and I hadn't
>> seen your post yet.
>>
>>
> I'm sorry, I thought were were responding WHAT?!? to me.
>
> I'm going to blame thunderbi
"julian" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Hi,
I have an application that along filling in some forms, it produces a pdf
file, as confirmation of all entered data.
I want to send this pdf file to a different window/tab of the browser, so
it is displayed and can l
If that's really your code then your script is going to get abused in no
time.
It's important to sanatize any user input before just writing it to a file.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
Is it possible to "return" more than one values in PHP?
return $x;
return $y;
They don't work for me.
-T
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Feb 18, 2008, at 531PM, Teck wrote:
Is it possible to "return" more than one values in PHP?
Yes, in the form of an array.
return $x;
return $y;
Only one return statement can be used.
http://us.php.net/manual/en/functions.returning-values.php
Brady
--
PHP General Mailing List (http://
You can't return more than one variable, but you can return an array that
contains multiple values.
$x = array('val1', 'val2');
return $x;
-TG
- Original Message -
From: Teck <[EMAIL PROTECTED]>
To: php-general@lists.php.net
Date: Tue, 19 Feb 2008 10:31:02 +0900
Subject: [PHP] More
On Monday 18 February 2008, Teck wrote:
> Hi,
>
>
> Is it possible to "return" more than one values in PHP?
>
> return $x;
> return $y;
>
> They don't work for me.
>
> -T
A function always returns a single value. That value can be an array.
function foo() {
return array(1, 2);
}
list($a, $b)
HTH
- Original Message -
From: "Teck" <[EMAIL PROTECTED]>
To:
Sent: Tuesday, February 19, 2008 1:31 AM
Subject: [PHP] More than one values returned?
Hi,
Is it possible to "return" more than one values in PHP?
return $x;
return $y;
They don't work for me.
-T
--
PHP General Ma
C.R.Vegelin wrote:
> $in = 4;
> calcpows($in, $pow2, $pow4);
> echo "in = $in pow2=$pow2 pow4=$pow4";
>
> // define return fields as &$...
> function calcpows($in, &$pow2, &$pow4)
> {
> $pow2 = $in * $in;
> $pow4 = $pow2 * $pow2;
> }
> ?>
>
> HTH
>
Thats a good example, and a good reason for p
On Mon, 2008-02-18 at 18:06 -0800, Nick Stinemates wrote:
> C.R.Vegelin wrote:
> > > $in = 4;
> > calcpows($in, $pow2, $pow4);
> > echo "in = $in pow2=$pow2 pow4=$pow4";
> >
> > // define return fields as &$...
> > function calcpows($in, &$pow2, &$pow4)
> > {
> > $pow2 = $in * $in;
> > $pow4
Robert Cummings wrote:
> On Mon, 2008-02-18 at 18:06 -0800, Nick Stinemates wrote:
>
>> C.R.Vegelin wrote:
>>
>>> >> $in = 4;
>>> calcpows($in, $pow2, $pow4);
>>> echo "in = $in pow2=$pow2 pow4=$pow4";
>>>
>>> // define return fields as &$...
>>> function calcpows($in, &$pow2, &$pow4)
>>> {
On Mon, 2008-02-18 at 18:29 -0800, Nick Stinemates wrote:
> Robert Cummings wrote:
> > On Mon, 2008-02-18 at 18:06 -0800, Nick Stinemates wrote:
> >
> >> C.R.Vegelin wrote:
> >>
> >>> >>> $in = 4;
> >>> calcpows($in, $pow2, $pow4);
> >>> echo "in = $in pow2=$pow2 pow4=$pow4";
> >>>
> >>>
On Monday 18 February 2008, Nick Stinemates wrote:
> >> I have found, however, that if I ever need to return /multiple/ values,
> >> it's usually because of bad design and/or the lack of proper
> >> encapsulation.
> >
> > You mean you've never had a function like getCoordinates()? Or
> > getUsers(
On Mon, 2008-02-18 at 21:09 -0600, Larry Garfield wrote:
> On Monday 18 February 2008, Nick Stinemates wrote:
>
> > >> I have found, however, that if I ever need to return /multiple/ values,
> > >> it's usually because of bad design and/or the lack of proper
> > >> encapsulation.
> > >
> > > You
I have a user saving a VARCHAR(255) field in a mysql db which has
single quotes in the text, how can i replace them so that they dont
fuck up my mysql command?
-e
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Mon, 2008-02-18 at 23:05 -0500, nihilism machine wrote:
> I have a user saving a VARCHAR(255) field in a mysql db which has
> single quotes in the text, how can i replace them so that they dont
> fuck up my mysql command?
mysql_real_escape_string()
Cheers,
Rob.
--
.--
return an array
bastien> From: [EMAIL PROTECTED]> To: php-general@lists.php.net> Date: Tue, 19
Feb 2008 10:31:02 +0900> Subject: [PHP] More than one values returned?> > Hi,>
> > Is it possible to "return" more than one values in PHP?> > return $x;>
return $y;> > They don't work for me.> > -T>
On Mon, 2008-02-18 at 23:19 -0500, Bastien Koert wrote:
> mysql_real_escape_string()
> addslashes()
> htmlentities()
>
> take your pick
That's a bad answer. If he's using MySQL then he SHOULD use
mysql_real_escape_string(). None of the other functions will fully
protect him from malicious input
nihilism machine wrote:
> I have a user saving a VARCHAR(255) field in a mysql db which has single
> quotes in the text, how can i replace them so that they dont fuck up my
> mysql command?
>
> -e
Have you tried: dont_fuck_up_my_mysql_command()
--
PHP General Mailing List (http://www.php.net/
mysql_real_escape_string()
addslashes()
htmlentities()
take your pick
bastien
> From: [EMAIL PROTECTED]> To: php-general@lists.php.net> Date: Mon, 18 Feb
> 2008 23:05:10 -0500> Subject: [PHP] mysql input> > I have a user saving a
> VARCHAR(255) field in a mysql db which has > single quotes
101 - 125 of 125 matches
Mail list logo