Hello all. I have a function that executes the unzip command.
function test_unzip($command) {
$stdout = shell_exec($command);
echo $stdout;
}
This is the content of $stdout after calling it with $command = unzip
./email/test.zip;
Archive: ./email/test.zip
inflating:
Vern wrote:
I get:
# wget -O -q http://www.comp-wiz.com/index.html | lpr -P hp1300n
What I wrote was
wget -O -q - http://www.domain.com/file.php | lpr -P hp1300n
You forgot -
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
I have a special offer available for you at our casino.
$20 to try our internet casino, no deposit is necessary!
At the casino software's cashier enter bonus code: FR93P
$200 bonus on your first deposit!
At the casino software's cashier enter bonus code: FMJKU
Allow us to show you our
C.F. Scheidecker Antunes wrote:
Hello all. I have a function that executes the unzip command.
..
What I want to do is to extract the value(s) after inflating, so that
I can check what was extracted from the zip.
You can do so with regular expresson but a more simple aproach may be to
use the
Justin Patrin [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Edit locally and FTP manually.
Or get some kind of mounted FTP filesystemdoesn't Windows XP have
something like this built in?
As far as I know, but there is great program that does that. WebDrive. A
true little
Hi Matt (et al),
I've added the c:\www\pear path to both the windows path and also the path in
the php.ini file. However it's still coming up with the same error. Is there
a way of putting in a temporary path in the go-pear.php file?
Nunners
Quoting Matt M. [EMAIL PROTECTED]:
Warning:
Hello Everyone,
I'm building a hotel management system and I can't seem to figure out why my
for() loop doesn't work the way it should. I'm using patTemplate to create
the HTML Template (I like using it and I don't want to start a pro/con
template war). Here is the script:
for ($j = 0; $j 32;
Hi all.
I'm trying to retrieve values from a previously selected dropdown menu. For
text I simply use value=$Whatever
But for dropdowns I can't do this - has anyone else come across this
before...?
--
-
Michael Mason
Arras People
www.arraspeople.co.uk
[EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
for ($j = 0; $j 32; $j++) {
for ($i = 0; $i count($num_days); $i++) {
$template-addVar(room_num, ROOM_NUM, '101');
$template-addVar(room_type, ROOM_TYPE, 'NQQ');
$template-addVar(guest_NameRate,
On Wed, 28 Jul 2004 20:49, Harlequin wrote:
Hi all.
I'm trying to retrieve values from a previously selected dropdown menu.
For text I simply use value=$Whatever
But for dropdowns I can't do this - has anyone else come across this
before...?
Surprisingly, yes. If the dropdown has
Would anyone know how to resolve this scope problem? Or is this possibly
something PHP can't (yet) do?
The problem is to access a variable in a function foo from a function local
to foo.
- - -
function foo($var_foo)
{
$my_foo_local = 10; //How can I reach this from inside function
[EMAIL PROTECTED] wrote:
Hi Matt (et al),
I've added the c:\www\pear path to both the windows path and also the path in
the php.ini file. However it's still coming up with the same error. Is there
a way of putting in a temporary path in the go-pear.php file?
Yes... ini_set('include_path',
[EMAIL PROTECTED] wrote:
Hello Everyone,
I'm building a hotel management system and I can't seem to figure out why my
for() loop doesn't work the way it should. I'm using patTemplate to create
the HTML Template (I like using it and I don't want to start a pro/con
template war). Here is the script:
Something like this is probably better handled by a class. Then you can access
class properties to do what you want.
Class yourclass
{
function foo()
{
$this-my_foo_local = 10;
}
function bar($var_bar)
{
return $this-my_foo_local+$var_bar+1;
}
}
$object = new yourclass();
OK David.
But here's the conundrum:
a User has already selected a value which is stored in the database. Can I
Display a range of option tags but make the one the user selected
previously as the default...?
???
--
-
Michael Mason
Arras People
Thanks for the good suggestion, a fully usable workaround if a cleaner
thing doesn't surface.
And for your response time.. well, I have had slower answers in
phone-conversations... :-)
At 06:37 PM 7/28/2004, Jason Barnett wrote:
Something like this is probably better handled by a class. Then
On 28 July 2004 12:50, Harlequin wrote:
OK David.
But here's the conundrum:
a User has already selected a value which is stored in the database.
Can I Display a range of option tags but make the one the user
selected previously as the default...?
That's been asked and answered many
On 28 July 2004 12:29, Frank Munch wrote:
Would anyone know how to resolve this scope problem? Or is
this possibly
something PHP can't (yet) do?
The problem is to access a variable in a function foo from a function
local to foo.
Actually, your problem is that the function bar is *not*
Hi,
i saw that 07/21/04, gd 2.0.28 has been released with gif support enabled
again (reading and creating). Since the beggining of the month, the Unisys
licence for Gif usage is not necessary anymore.
So maybe this question has already been asked, but I didn't find it (sorry),
will next version
Hi
I have a class the utilizes the excel writer package but I'm having a few
problems with it on my production server.
My development server is a Windows XP Pro box running PHP version 4.3.5. On
this box I dont get any problems and my class generates a valid excel
document.
My production server
At 07:39 PM 7/28/2004, Ford, Mike [LSS] wrote:
Actually, your problem is that the function bar is *not* local to foo. Even
though PHP lets you declare functions lexically within the scope of other
functions
snip
Ouch! Thanks! Got that much wiser! So for keeping the namespace cleaner
Hi I have this function below - if it reurns false I want to also return the error so
I can print it in my calling function. Can I do this?
Cheers
Matt
function fileUpload($file) {
if ($file['type'] == image/gif || $file['type'] == image/pjpeg){
if (@copy ($file['tmp_name'], images/ .
Which bug tracking tool is php.net using? I know it sounds stupid, but even
as I can look at the source on php.net, I can't find any documentation- is
this package available for download somewhere?
Thanks,
Andreas
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Matthew Oatham wrote:
Hi I have this function below - if it reurns false I want to also return the error so
I can print it in my calling function. Can I do this?
Cheers
Matt
function fileUpload($file) {
if ($file['type'] == image/gif || $file['type'] == image/pjpeg){
if (@copy
what about returning the error the copy function would have thrown ?
Thanks
- Original Message -
From: John Nichel [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 28, 2004 3:00 PM
Subject: Re: [PHP] How do I return the error
Matthew Oatham wrote:
Hi I have this
Matthew Oatham wrote:
what about returning the error the copy function would have thrown ?
Thanks
http://us4.php.net/copy
It only returns true or false.
--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Hello,
I'm looking for an application that would allow easy documentation of
changes to a system, device or application. This would be used to
record changes made for future reference. It would simply have
categories that would contain a particular device or system and under
that device or system
I'm just about to dive into image uploading resizing for the first
time. Do I need Imagemagick for this, or are PHP's Image tags adequate?
All I want to do is let the user upload a graphic, and have PHP
automatically scale it to a couple of desired sizes, and name them,
pretty basic stuff.
I
On Wednesday 28 July 2004 23:05, Brian Dunning wrote:
I'm just about to dive into image uploading resizing for the first
time. Do I need Imagemagick for this, or are PHP's Image tags adequate?
All I want to do is let the user upload a graphic, and have PHP
automatically scale it to a couple
Hello,
Brian Dunning wrote:
I'm just about to dive into image uploading resizing for the first
time. Do I need Imagemagick for this, or are PHP's Image tags
adequate? All I want to do is let the user upload a graphic, and have
PHP automatically scale it to a couple of desired sizes, and name
Hey, you can do what your looking for with phps gd comiled in. You
may need to add jpg, gif libs if you dont already have them. Check GD
on the php site, there are plenty of examples that cover exactly what
your looking for i think.
Jason
On Wed, 28 Jul 2004 08:05:52 -0700, Brian Dunning
I ended up with this:
option selected?php echo $Variable; ?/option
Can you see any obvious problems I might miss.?
--
-
Michael Mason
Arras People
www.arraspeople.co.uk
-
Harlequin [EMAIL PROTECTED] wrote in message
news:[EMAIL
option selected?php echo $Variable; ?/option
Can you see any obvious problems I might miss.?
You're specifying a variable for the option's text, but you also need to
specify the option's value. For example, if you were retrieving data from
MySQL:
while ($record =
Hi all,
I'm dealing with sessions in a project. Here people are editing some
documents on-line, so it can take long, long time to complete a document.
The problem is that when it takes so long to edit a page and hitting the
submit button in a form, the session has expired and the user looses
* Thus wrote Andreas Goetz:
Which bug tracking tool is php.net using? I know it sounds stupid, but even
as I can look at the source on php.net, I can't find any documentation- is
this package available for download somewhere?
you can checkout the code from cvs:
cvs -d :pserver:[EMAIL
* Thus wrote Matthew Oatham:
what about returning the error the copy function would have thrown ?
* turn display_errors off: ini_set('display_errors', false);
* turn track_errors on: ini_set('track_errors', true);
if (! copy(...) ) {
echo copy failed: $php_errormsg;
}
Curt
--
First, let
I've been looking for about changing somewhere the session exiration
time, but only found about the session cookie expiration.
- Wich is the default timeout for a session? And, is some way to know
the expiration time for a session?
Take a look at the ini variables.
I beleive there is some session timeout setting in php.ini .. search
for session or expire or timeout in that file.
Jason
On Wed, 28 Jul 2004 20:18:21 +0200, Jordi Canals [EMAIL PROTECTED] wrote:
Hi all,
I'm dealing with sessions in a project. Here people are editing some
documents
I'd like to make a few changes here to hopefully answer the original question.
On Wednesday 28 July 2004 01:35 pm, Ed Lazor wrote:
echo select name=\record\;
while ($record = mysql_fetch_array($results)) {
if ($_POST[record] == $record[ID]){
$SELECTED = SELECTED ;
Hi all,
I am doing some development work on a new server I put together. For
some reason, changes I make to PHP templates don't show up right away.
I have not figured out how long they take to start showing, but it
could be somewhere around 30 - 60 seconds.
Where is this setting modified?
Linux. PHP5.
Maybe I'm doing something wrong, but I've tried both:
unset($_COOKIE['foo']);
And also
$_COOKIE['foo'] = '';
And neither of them seem to do anything. I can still see the cookie and
worse, the value if I do
foreach ($_COOKIE as $key = $val) echo $key = $val;
--
PHP General
unset($_COOKIE['foo']);
And also
$_COOKIE['foo'] = '';
Are you trying to delete the cookie on the client side?
if so try:
setcookie ('foo', '', time() - 3600);
http://us2.php.net/setcookie
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Hello,
I'm trying to make this code to work:
// start of code
abstract class Strona {
abstract public function generuj_strone();
function foo() {
generuj_strone();
}
}
class Katalog extends Strona {
public function generuj_strone() {
echo OK;
}
}
$bar =
Does is_numeric include commas decimals and dollar signs?
How do I use this to error check form data? I'm having a hard time
figuring out what the correct syntax is for that application. Thanks.
Jeff
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
No. I'm trying to delete it from PHP memory, but keep the cookie on their
client in the cookie.txt file or wherever it's stored.
The idea is for added security. I just don't want traces of it around after
the initial login.
-Original Message-
From: Matt M. [mailto:[EMAIL PROTECTED]
Hello,
I'm trying to make this code to work:
// start of code
abstract class Strona {
abstract public function generuj_strone();
function foo() {
generuj_strone();
}
}
class Katalog extends Strona {
public function generuj_strone() {
echo OK;
}
}
$bar =
Jeff Oien wrote:
Does is_numeric include commas decimals and dollar signs?
How do I use this to error check form data? I'm having a hard time
figuring out what the correct syntax is for that application. Thanks.
Jeff
I think what I should have asked is how to tell if something is not
numberic.
Jeff Oien [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Does is_numeric include commas decimals and dollar signs?
How do I use this to error check form data? I'm having a hard time
figuring out what the correct syntax is for that application. Thanks.
Jeff
It surely will not allow
From: Jeff Oien [EMAIL PROTECTED]
Does is_numeric include commas decimals and dollar signs?
How do I use this to error check form data? I'm having a hard time
figuring out what the correct syntax is for that application. Thanks.
Jeff
I think what I should have asked is how to
http://us4.php.net/manual/en/language.oop5.abstract.php
The short is that you can't do anything more than define a function in
an abstract class.
IIRC, change abstract to interface, and you'll probably be okay.
On Wed, 28 Jul 2004 21:18:26 +0200, Krzysztof Gorzelak [EMAIL PROTECTED] wrote:
A change to interface gives me such error :
Interface function Strona::foo() cannot contain body
Krzysztof Gorzelak
[EMAIL PROTECTED]
Uzytkownik Stephen Sadowski [EMAIL PROTECTED] napisal w
wiadomosci news:[EMAIL PROTECTED]
http://us4.php.net/manual/en/language.oop5.abstract.php
The short
* Thus wrote Krzysztof Gorzelak:
// start of code
abstract class Strona {
abstract public function generuj_strone();
function foo() {
generuj_strone();
}
}
class Katalog extends Strona {
public function generuj_strone() {
echo OK;
}
}
* Thus wrote Stephen Sadowski:
http://us4.php.net/manual/en/language.oop5.abstract.php
The short is that you can't do anything more than define a function in
an abstract class.
Negative. It is perfectly fine to have code within an abstract
class. The documentation needs to get expanded a
Uzytkownik Curt Zirzow [EMAIL PROTECTED] napisal w
wiadomosci
* Thus wrote Krzysztof Gorzelak:
// start of code
abstract class Strona {
abstract public function generuj_strone();
function foo() {
generuj_strone();
}
}
class Katalog extends Strona {
Matt M. wrote:
- Wich is the default timeout for a session? And, is some way to know
the expiration time for a session?
Take a look at the ini variables.
http://us2.php.net/session
session.gc_maxlifetime
Thanks Matt. for your quick and clear answer.
I've readed about it, and seen the default is 24
On Wed, 28 Jul 2004 14:41:20 -0400, rogue [EMAIL PROTECTED] wrote:
Hi all,
I am doing some development work on a new server I put together. For
some reason, changes I make to PHP templates don't show up right away.
I have not figured out how long they take to start showing, but it
could be
Hi there.. .I am displaying info (on music) from a text file with the
following code...
?php
//open the file handler
$fp02=fopen(assets/lib/php/itunes/recent.txt,r);
//Read the track info
$recent=fgets($fp02);
//close the file.
echo $recent;
fclose($fp02);
?
Now the contents of said text file
Dustin Krysak wrote:
Hi there.. .I am displaying info (on music) from a text file with the
following code...
?php
//open the file handler
$fp02=fopen(assets/lib/php/itunes/recent.txt,r);
//Read the track info
$recent=fgets($fp02);
//close the file.
echo $recent;
fclose($fp02);
?
Now the
Does anybody have any ideas on how I can prevent caching of
$_SERVER['PHP_AUTH_USER'] and $_SERVER['PHP_AUTH_PW'], or clear them?
I currently have a restricted area on the site I'm currently designing
and all works well until I log out.
When I log out I successfully destroy the session and the
From: Stephen Sadowski [EMAIL PROTECTED]
Subject: Re: [PHP] php5 and object
http://us4.php.net/manual/en/language.oop5.abstract.php
The short is that you can't do anything more than define a function in
an abstract class.
IIRC, change abstract to interface, and you'll probably be okay.
From: Mark Collin [EMAIL PROTECTED]
Does anybody have any ideas on how I can prevent caching of
$_SERVER['PHP_AUTH_USER'] and $_SERVER['PHP_AUTH_PW'], or clear them?
You can't clear them; they're sent by the browser. It'll keep resending the same
values and you're script will authenticate.
Vail, Warren wrote:
I did one application where I used the PHP session table to tell who was
logged on, and which area of the application they were most recently in.
One of several flaws, was that I used Kill session to logoff, and that
caused them to disappear from any count of users logged on.
Hi,
Wednesday, July 28, 2004, 11:56:16 PM, you wrote:
MO Hi I have this function below - if it reurns false I want to
MO also return the error so I can print it in my calling function.
MO Can I do this?
MO Cheers
MO Matt
MO function fileUpload($file) {
MO if ($file['type'] == image/gif ||
with this code fragment:
?
$string='/mobile/phone.html';
if (strpos($string,'/mobile/')!==false) { print one: yes\n; }
if (strpos($string,'/mobile/')===true) { print two: yes\n; }
?
only the first if statement prints anything. why is !== false not the
same as === true ?
-jsd-
--
PHP General
Curt Zirzow wrote:
* Thus wrote Stephen Sadowski:
http://us4.php.net/manual/en/language.oop5.abstract.php
The short is that you can't do anything more than define a function in
an abstract class.
Negative. It is perfectly fine to have code within an abstract
class. The documentation needs
On Wed, 28 Jul 2004 17:50:01 -0700, Jon Drukman [EMAIL PROTECTED] wrote:
with this code fragment:
?
$string='/mobile/phone.html';
if (strpos($string,'/mobile/')!==false) { print one: yes\n; }
if (strpos($string,'/mobile/')===true) { print two: yes\n; }
?
only the first if statement
On Wed, 28 Jul 2004 21:19, Harlequin wrote:
OK David.
But here's the conundrum:
a User has already selected a value which is stored in the database. Can I
Display a range of option tags but make the one the user selected
previously as the default...?
???
Yes you can.
I'm not going
I have a database generated page and I want to show a Print Version in a
new window when somebody selects the print option.
http://www.test.com/docs/view_record.php?id=1
http://www.test.com/docs/print_record.php?id=1
What is the correct way to open the page from the print link to a new
page?
Yeah I do not really have the option to use a database here since the
way the data is output is limited to a text file.. the files are
populated by a program that takes the currently playing tracks out of
Itunes (mp3 player) on my mac.
d
On 28-Jul-04, at 3:26 PM, [EMAIL PROTECTED] wrote:
--- Karl-Heinz Schulz [EMAIL PROTECTED] wrote:
I have a database generated page and I want to show
a Print Version in a
new window when somebody selects the print option.
http://www.test.com/docs/view_record.php?id=1
http://www.test.com/docs/print_record.php?id=1
What is the correct
Zareef,
Thank you for the reply but I may was not very clear.
I don't know how to pass the record id from the view_record?id=1 to
print_record?=whateverTheViewRecordId was.
Karl-Heinz
-Original Message-
From: zareef ahmed [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 28, 2004 11:03
PayPal passes a ton of data back to us when someone's done
purchasing something. I use some of that information and shove it all
into a database. Problem is, if someone hits reload on their browser, I
get the same data re-inserted again. Reload the page four times, and I
will get four
--- Karl-Heinz Schulz [EMAIL PROTECTED] wrote:
Zareef,
Thank you for the reply but I may was not very
clear.
I don't know how to pass the record id from the
view_record?id=1 to
print_record?=whateverTheViewRecordId was.
Consider it
$id=select id from database
?php
print a
* Thus wrote Karl-Heinz Schulz:
I have a database generated page and I want to show a Print Version in a
new window when somebody selects the print option.
http://www.test.com/docs/view_record.php?id=1
http://www.test.com/docs/print_record.php?id=1
What is the correct way to open the
Thank you for your help.
-Original Message-
From: zareef ahmed [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 28, 2004 11:25 PM
To: Karl-Heinz Schulz
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] Java Script or PHP
--- Karl-Heinz Schulz [EMAIL PROTECTED] wrote:
Zareef,
Thank you for
Linux. PHP5.
Why does this fail when using an array element, but using a variable will
work? Why should PHP care what the variable is I'm trying to store into?
list($bar['CompanyCode'], $CompanyDB) = mysql_fetch_row($sth);
But this works:
list($foo, $CompanyDB) = SQL_ROW($sth);
And of
* Thus wrote Ashley M. Kirchner:
PayPal passes a ton of data back to us when someone's done
purchasing something. I use some of that information and shove it all
into a database. Problem is, if someone hits reload on their browser, I
get the same data re-inserted again. Reload the
Because === and !== check the type as well. Of you set $string =
'blah' you'll still get the same result.
If you were using != and == both would print.
strpos() returns an int, so comparing it to false with === is always
false. The same would be true for true.
That's half right. strpos actually
Heck, even I got it wrong ;) True check below should always fail...
Jason Barnett wrote:
Because === and !== check the type as well. Of you set $string =
'blah' you'll still get the same result.
If you were using != and == both would print.
strpos() returns an int, so comparing it to false with
On Wed, 28 Jul 2004 20:47:37 -0700, Daevid Vincent [EMAIL PROTECTED] wrote:
Linux. PHP5.
Why does this fail when using an array element, but using a variable will
work? Why should PHP care what the variable is I'm trying to store into?
list($bar['CompanyCode'], $CompanyDB) =
check the manual for list. It mentions using only numerical array
indices for list. There is a warning on it even i beleive.
Jason
On Wed, 28 Jul 2004 20:47:37 -0700, Daevid Vincent [EMAIL PROTECTED] wrote:
Linux. PHP5.
Why does this fail when using an array element, but using a variable
81 matches
Mail list logo