|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
php-general Digest 28 Jul 2004 09:24:07 -0000 Issue 2903
php-general-digest-help
lists.php.net
Date: Wed Jul 28 2004 - 04:24:07 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
php-general Digest 28 Jul 2004 09:24:07 -0000 Issue 2903
Topics (messages 192022 through 192077):
Re: freeTDS
192022 by: Josh Close
192043 by: Jon Bertsch
Sessions Timeout
192023 by: Enda Nagle - Lists
192026 by: Jason Davidson
192027 by: Matt M.
Sendmail Return-Path
192024 by: Enda Nagle - Lists
192029 by: Justin Patrin
192034 by: Curt Zirzow
192035 by: Manuel Lemos
192038 by: Enda Nagle - Lists
Array assistance
192025 by: Alex Hogan
192028 by: Jason Davidson
192030 by: Matt M.
html text area and mysql text fields
192031 by: Matthew Oatham
192032 by: Matthew Sims
192033 by: Enda Nagle - Lists
192036 by: Jason Davidson
192037 by: Matthew Sims
192041 by: Matthew Sims
Verifying AUthorised Users through Session Variables not Working...?
192039 by: Harlequin
192042 by: Justin Patrin
Anyone use japha?
192040 by: Brent Clements
eliminate <enter> keyword
192044 by: Raúl Castro
192045 by: Jason Davidson
192046 by: Justin Patrin
Showing all users who are logged in
192047 by: Jason Giangrande
192048 by: Justin Patrin
192049 by: Jason Davidson
192050 by: Vail, Warren
Using htaccess to show diff dir (0T)
192051 by: PHP Gen
RE[PHP] Using htaccess to show diff dir (0T) (SOLVED)
192052 by: PHP Gen
Re: Printing using php script CRON
192053 by: Jason Wong
192074 by: Burhan Khalid
Urgent..my MYSQL dies..
192054 by: Fitra Alfina
192055 by: Ed Lazor
192056 by: raditha dissanayake
192065 by: holmes072000.charter.net
192068 by: Jason Barnett
how to restart deamon??
192057 by: Fitra Alfina
192058 by: David Robley
Adding +7 more days on date() value problem
192059 by: Louie Miranda
192060 by: Justin Patrin
192061 by: Jason Wong
192063 by: Jason Davidson
Re: [phpug-ph] expiring logins with-in 5days, nde pwede cookies.
192062 by: Louie Miranda
Problem with circular include statement
192064 by: C.F. Scheidecker Antunes
192067 by: Jason Barnett
Data management tool
192066 by: Jaskirat Singh
192070 by: Justin Patrin
192072 by: Harry G
Call for XML / XPATH examples
192069 by: Jason Barnett
Page Numbering Search Results
192071 by: Harry G
Extracting string from shell_exec call
192073 by: C.F. Scheidecker Antunes
192076 by: raditha dissanayake
We give you $200 bonus at Casino Zeal!
192075 by: Homer R. McIntosh
Re: PHP editor that doesn't require installation
192077 by: rush
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
Well, they're going to have to install php with mssql support also
./configure --with-mssql --with-freetds
there are examples in the freetds.conf file of what you need to do.
Basically just telling it where to connect.
-Josh
On Tue, 27 Jul 2004 16:49:37 -0400, John Nichel <john
kegworks.com> wrote:
>
>
> Edward Peloke wrote:
> > no, I don't see any mssql info...and yes, they said they did recompile with
> > freetds. If there anything I have to change in the freetds conf file or in
> > php.ini?
> <snip>
>
> Then either :
>
> A) It hasn't been compiled with FreeTDS or,
> B) The web server hasn't been restarted.
>
> --
> John C. Nichel
> ÜberGeek
> KegWorks.com
> 716.856.9675
> john
kegworks.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
attached mail follows:
Hi,
Make sure freetds was compiled with --enable-msdblib
Make sure that php was compiled with --with-mssql=/path/to/freetds
Make sure that you edit the file freetds.conf (freetds/etd/freetds.conf) to
have an entry for your database e.g:
[myserver]
host = myserver.domain.name
port = 1433
tds version = 7.0
you can also add login and password or specify in your database connection
script.
HTH a little
Jon Bertsch
attached mail follows:
Hi Guys,
I have a problem with a site where Iım using sessions.
Basically, I have it so that someone enters the site and their session
(shopping cart ref) is created on entry (unless it already exists) and all
variables are stored in the session.
Problem is that when someone goes so far in the ordering process, and then
(for whatever reason) leaves the site, and comes back hours, seconds or
whatever later, and goes again to place an order, the details are different
(time), and the session stays the same so the order entry is entered twice
in the database.
I have gotten around this by checking for the existence of the database
entry for that person and session, and if the entry exists, then I just
update the details, but Iım wondering if there might be a better way of
doing this?
I had looked at the idea of sessions expiring and found the following in my
php.ini file, and see that the session lifetime is set to 24mins, but am
wondering if there is any given reason why I should change this (or not!).
session.cookie_lifetime = 0
session.gc_maxlifetime = 1440
Thanks for the help,
Enda
--
- + - + - + - + - + - + - + - + - + - + - + - + -
Enda Nagle
+353 86 168 0774
enda
category9.com
www.category9.com
- + - + - + - + - + - + - + - + - + - + - + - + -
attached mail follows:
I would put a timelimit on the session, create a session var called
time, or loginTime or something, and compare it to time() with php,
give a leyway of an hour or something. This is a standard securty
measure to prevent people from leaving the pc with a session running
all day, and someone else sitting down and ordering the world to his
home.
So if the session is an hour old, destroy it.
Jason
On Tue, 27 Jul 2004 22:17:08 +0100, Enda Nagle - Lists
<lists
nightsol.net> wrote:
> Hi Guys,
>
> I have a problem with a site where Iım using sessions.
>
> Basically, I have it so that someone enters the site and their session
> (shopping cart ref) is created on entry (unless it already exists) and all
> variables are stored in the session.
>
> Problem is that when someone goes so far in the ordering process, and then
> (for whatever reason) leaves the site, and comes back hours, seconds or
> whatever later, and goes again to place an order, the details are different
> (time), and the session stays the same so the order entry is entered twice
> in the database.
>
> I have gotten around this by checking for the existence of the database
> entry for that person and session, and if the entry exists, then I just
> update the details, but Iım wondering if there might be a better way of
> doing this?
>
> I had looked at the idea of sessions expiring and found the following in my
> php.ini file, and see that the session lifetime is set to 24mins, but am
> wondering if there is any given reason why I should change this (or not!).
>
> session.cookie_lifetime = 0
> session.gc_maxlifetime = 1440
>
> Thanks for the help,
>
> Enda
> --
>
> - + - + - + - + - + - + - + - + - + - + - + - + -
>
> Enda Nagle
> +353 86 168 0774
> enda
category9.com
> www.category9.com
>
> - + - + - + - + - + - + - + - + - + - + - + - + -
>
>
attached mail follows:
> Problem is that when someone goes so far in the ordering process, and then
> (for whatever reason) leaves the site, and comes back hours, seconds or
> whatever later, and goes again to place an order, the details are different
> (time), and the session stays the same so the order entry is entered twice
> in the database.
Why not just clear the order info from the session once the order is placed?
attached mail follows:
Hi Guys,
Iım using PHPıs mail() function on several sites, but have difficulty
sometimes with the mails being tagged as SPAM.
I want to have the Return-Path set to the site admin, but canıt see where to
do this.
I know that it can be done at server root level but I canıt really do that
as its a shared server.
I do have my own php.ini file for my site, but can only see the following
vars:
mail function]
; For Win32 only.
SMTP = localhost
; For Win32 only.
sendmail_from = me
localhost.com
; For Unix only. You may supply arguments as well (default: "sendmail -t
-i").
sendmail_path = /usr/sbin/sendmail -t -i
Iım working off a Linux box, so presumably I canıt use the sendmail_from
variable?
I also tried to set the following variable in the headers for the mail:
$headers .= "X-Return-path: ME <user
domain.com>\r\n";
Any help appreciated,
Thanks
Enda
--
- + - + - + - + - + - + - + - + - + - + - + - + -
Enda Nagle
+353 86 168 0774
enda
category9.com
www.category9.com
- + - + - + - + - + - + - + - + - + - + - + - + -
attached mail follows:
On Tue, 27 Jul 2004 22:07:52 +0100, Enda Nagle - Lists
<lists
nightsol.net> wrote:
> Hi Guys,
>
> Iım using PHPıs mail() function on several sites, but have difficulty
> sometimes with the mails being tagged as SPAM.
>
> I want to have the Return-Path set to the site admin, but canıt see where to
> do this.
>
> I know that it can be done at server root level but I canıt really do that
> as its a shared server.
>
> I do have my own php.ini file for my site, but can only see the following
> vars:
>
> mail function]
> ; For Win32 only.
> SMTP = localhost
>
> ; For Win32 only.
> sendmail_from = me
localhost.com
>
> ; For Unix only. You may supply arguments as well (default: "sendmail -t
> -i").
> sendmail_path = /usr/sbin/sendmail -t -i
>
> Iım working off a Linux box, so presumably I canıt use the sendmail_from
> variable?
Nope, that's only for windows.
>
> I also tried to set the following variable in the headers for the mail:
>
> $headers .= "X-Return-path: ME <user
domain.com>\r\n";
This should work if you put it in the right place in the call. Try
just \n as well. If it doesn't work, try using a mailing class such
as:
http://pear.php.net/package/Mail
>
> Any help appreciated,
>
> Thanks
>
> Enda
> --
>
> - + - + - + - + - + - + - + - + - + - + - + - + -
>
> Enda Nagle
> +353 86 168 0774
> enda
category9.com
> www.category9.com
>
> - + - + - + - + - + - + - + - + - + - + - + - + -
>
> !DSPAM:4106c542182671082813648!
>
--
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder
paperCrane --Justin Patrin--
attached mail follows:
* Thus wrote Enda Nagle - Lists:
> Hi Guys,
>
> Iım using PHPıs mail() function on several sites, but have difficulty
> sometimes with the mails being tagged as SPAM.
>
> I want to have the Return-Path set to the site admin, but canıt see where to
> do this.
>
> I know that it can be done at server root level but I canıt really do that
> as its a shared server.
>
> ...
>
> Iım working off a Linux box, so presumably I canıt use the sendmail_from
> variable?
>
> I also tried to set the following variable in the headers for the mail:
>
> $headers .= "X-Return-path: ME <user
domain.com>\r\n";
use the 5th parameter to mail();
mail(..., '-f "ME <user
domain.com>"');
Curt
--
First, let me assure you that this is not one of those shady pyramid schemes
you've been hearing about. No, sir. Our model is the trapezoid!
attached mail follows:
Hello,
On 07/27/2004 06:07 PM, Enda Nagle - Lists wrote:
> Iım using PHPıs mail() function on several sites, but have difficulty
> sometimes with the mails being tagged as SPAM.
>
> I want to have the Return-Path set to the site admin, but canıt see where to
> do this.
>
> I know that it can be done at server root level but I canıt really do that
> as its a shared server.
>
> I do have my own php.ini file for my site, but can only see the following
> vars:
>
> mail function]
> ; For Win32 only.
> SMTP = localhost
>
> ; For Win32 only.
> sendmail_from = me
localhost.com
>
> ; For Unix only. You may supply arguments as well (default: "sendmail -t
> -i").
> sendmail_path = /usr/sbin/sendmail -t -i
>
> Iım working off a Linux box, so presumably I canıt use the sendmail_from
> variable?
>
> I also tried to set the following variable in the headers for the mail:
>
> $headers .= "X-Return-path: ME <user
domain.com>\r\n";
Setting the return path is dependent of the delivery method.
You may be able to set it using the mail function fifth argument, send
via SMTP or call the sendmail program directly.
You may want to try this class that simplifies everything by emulating
the Return-Path header. Then, depending on the delivery method that is
used, it will map to the appropriate action to set the return path
address. You have the option to choose delivery via the mail() function,
sendmail program, qmail program . Pick one delivery option that works
well for you given your environment restrictions.
http://www.phpclasses.org/mimemessage
Feel free to mail me privately if you need further help, so you do not
have to disclose in public private details of your environment.
--
Regards,
Manuel Lemos
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/
Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
attached mail follows:
Hi Justin,
I just tried this code:
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\n";
$headers .= "From: Webstore <info
domain.com>\n";
$headers .= "To: $email_address\n";
$headers .= "Bcc: enda
category9.com\n";
$headers .= "X-Priority: 1\n";
$headers .= "X-MSMail-Priority: Normal\n";
$headers .= "X-Mailer: My Website\n";
$headers .= "X-Return-path: ME <user
domain.com>\n";
$subject = "Your Order";
$from = "enda
category9.com";
$message .="xxxxxx";
mail($to, $subject, $message, $from, $headers)
or print "Could not send mail to customer";
But I get a SAFE MODE error, so I guess Iıll just have to try that PEAR
package.
Regards
Enda
--
On 27/07/2004 22:25, "Justin Patrin" <papercrane
gmail.com> wrote:
> On Tue, 27 Jul 2004 22:07:52 +0100, Enda Nagle - Lists
> <lists
nightsol.net> wrote:
>> > Hi Guys,
>> >
>> > Iım using PHPıs mail() function on several sites, but have difficulty
>> > sometimes with the mails being tagged as SPAM.
>> >
>> > I want to have the Return-Path set to the site admin, but canıt see where
>> to
>> > do this.
>> >
>> > I know that it can be done at server root level but I canıt really do that
>> > as its a shared server.
>> >
>> > I do have my own php.ini file for my site, but can only see the following
>> > vars:
>> >
>> > mail function]
>> > ; For Win32 only.
>> > SMTP = localhost
>> >
>> > ; For Win32 only.
>> > sendmail_from = me
localhost.com
>> >
>> > ; For Unix only. You may supply arguments as well (default: "sendmail -t
>> > -i").
>> > sendmail_path = /usr/sbin/sendmail -t -i
>> >
>> > Iım working off a Linux box, so presumably I canıt use the sendmail_from
>> > variable?
>
> Nope, that's only for windows.
>
>> >
>> > I also tried to set the following variable in the headers for the mail:
>> >
>> > $headers .= "X-Return-path: ME <user
domain.com>\r\n";
>
> This should work if you put it in the right place in the call. Try
> just \n as well. If it doesn't work, try using a mailing class such
> as:
>
> http://pear.php.net/package/Mail
>
>> >
>> > Any help appreciated,
>> >
>> > Thanks
>> >
>> > Enda
>> > --
>> >
>> > - + - + - + - + - + - + - + - + - + - + - + - + -
>> >
>> > Enda Nagle
>> > +353 86 168 0774
>> > enda
category9.com
>> > www.category9.com
>> >
>> > - + - + - + - + - + - + - + - + - + - + - + - + -
>> >
>> > !DSPAM:4106c542182671082813648!
>> >
>
attached mail follows:
Hi All,
I have a page where I'm collecting answers from a series of questions.
The questions are entered into the array one at a time so I can keep
track of paging.
$arans = array($_POST);
$_SESSION['arans'][$pageid] = $arans;
Then I want to check the sum of the array for scoring purposes. However
I have to get to the key that has the values for the scores.
for($i = 1; $i <= 10; $i++){
print_r($_SESSION['arans'][$i]);
print"<br>";
}
Give me this...
Array ( [0] => Array ( [mc] => 0 [Submit] => Submit ) )
Array ( [0] => Array ( [mc] => 10 [Submit] => Submit ) )
Array ( [0] => Array ( [mc] => 0 [Submit] => Submit ) )
Array ( [0] => Array ( [truefalse] => 10 [Submit] => Submit ) )
Array ( [0] => Array ( [mc] => 0 [Submit] => Submit ) )
Array ( [0] => Array ( [truefalse] => 10 [Submit] => Submit ) )
Array ( [0] => Array ( [mc] => 0 [Submit] => Submit ) )
Array ( [0] => Array ( [truefalse] => 10 [Submit] => Submit ) )
Array ( [0] => Array ( [mc] => 10 [Submit] => Submit ) )
Array ( [0] => Array ( [truefalse] => 10 [Submit] => Submit ) )
Ten separate arrays with an array at 0 that has the data I'm after.
This is where I'm getting stuck. How can I get to the keys that are
either 'mc' or 'truefalse' and sum them?
Thanks,
alex hogan
*************************************************************************************
The contents of this e-mail and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom it is addressed. The
views stated herein do not necessarily represent the view of the company. If you are
not the intended recipient of this e-mail you may not copy, forward, disclose, or
otherwise use it or any part of it in any form whatsoever. If you have received this
e-mail in error please e-mail the sender.
*************************************************************************************
attached mail follows:
I would simply build the array more specifically, so that it doesnt
include things you dont want.
Jason
On Tue, 27 Jul 2004 16:20:02 -0500, Alex Hogan
<alex.hogan
alliedelec.com> wrote:
> Hi All,
>
> I have a page where I'm collecting answers from a series of questions.
> The questions are entered into the array one at a time so I can keep
> track of paging.
> $arans = array($_POST);
> $_SESSION['arans'][$pageid] = $arans;
>
> Then I want to check the sum of the array for scoring purposes. However
> I have to get to the key that has the values for the scores.
>
> for($i = 1; $i <= 10; $i++){
> print_r($_SESSION['arans'][$i]);
> print"<br>";
> }
>
> Give me this...
>
> Array ( [0] => Array ( [mc] => 0 [Submit] => Submit ) )
> Array ( [0] => Array ( [mc] => 10 [Submit] => Submit ) )
> Array ( [0] => Array ( [mc] => 0 [Submit] => Submit ) )
> Array ( [0] => Array ( [truefalse] => 10 [Submit] => Submit ) )
> Array ( [0] => Array ( [mc] => 0 [Submit] => Submit ) )
> Array ( [0] => Array ( [truefalse] => 10 [Submit] => Submit ) )
> Array ( [0] => Array ( [mc] => 0 [Submit] => Submit ) )
> Array ( [0] => Array ( [truefalse] => 10 [Submit] => Submit ) )
> Array ( [0] => Array ( [mc] => 10 [Submit] => Submit ) )
> Array ( [0] => Array ( [truefalse] => 10 [Submit] => Submit ) )
>
> Ten separate arrays with an array at 0 that has the data I'm after.
> This is where I'm getting stuck. How can I get to the keys that are
> either 'mc' or 'truefalse' and sum them?
>
> Thanks,
>
> alex hogan
>
> *************************************************************************************
> The contents of this e-mail and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom it is addressed. The
> views stated herein do not necessarily represent the view of the company. If you are
> not the intended recipient of this e-mail you may not copy, forward, disclose, or
> otherwise use it or any part of it in any form whatsoever. If you have received this
> e-mail in error please e-mail the sender.
> *************************************************************************************
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
attached mail follows:
> Ten separate arrays with an array at 0 that has the data I'm after.
> This is where I'm getting stuck. How can I get to the keys that are
> either 'mc' or 'truefalse' and sum them?
foreach my man
http://us2.php.net/foreach
foreach ($_SESSION['arans'] as $arans) {
$truefalse += $arans['truefalse'];
$mc += $arans['mc'];
}
attached mail follows:
Hi,
If I have a html textarea for inputting text into a database text field how can I keep the formatting of the entered text?
i.e. on the html textarea if the user enters carriage returns i.e. a new paragraph I want that to go into the database then when I retrieve it and display it on a normal html page I want to keep those carriage returns!
Thanks
Matt
attached mail follows:
> Hi,
>
> If I have a html textarea for inputting text into a database text field
> how can I keep the formatting of the entered text?
>
> i.e. on the html textarea if the user enters carriage returns i.e. a new
> paragraph I want that to go into the database then when I retrieve it and
> display it on a normal html page I want to keep those carriage returns!
>
> Thanks
>
> Matt
Before injecting textarea data into a DB use this:
$_POST["textarea"] = str_replace("\n","<br>",$_POST["textarea"]);
When retrieving data from the DB for a textarea use this before displaying:
$_POST["textarea"] = str_replace("<br>","\n",$_POST["textarea"]);
--
--Matthew Sims
--<http://killermookie.org>
attached mail follows:
I usually leave the string intact in the database because if you need to
show it in an admin area or something, you donıt need to convert it back
again before populating the text area.
Suppose it just comes down to personal preference... Or is there a specific
benefit to doing it this way?
Regards
Enda
--
- + - + - + - + - + - + - + - + - + - + - + - + -
Enda Nagle
+353 86 168 0774
enda
category9.com
www.category9.com
- + - + - + - + - + - + - + - + - + - + - + - + -
On 27/07/2004 22:55, "Matthew Sims" <matt
killermookie.org> wrote:
>> > Hi,
>> >
>> > If I have a html textarea for inputting text into a database text field
>> > how can I keep the formatting of the entered text?
>> >
>> > i.e. on the html textarea if the user enters carriage returns i.e. a new
>> > paragraph I want that to go into the database then when I retrieve it and
>> > display it on a normal html page I want to keep those carriage returns!
>> >
>> > Thanks
>> >
>> > Matt
>
> Before injecting textarea data into a DB use this:
>
> $_POST["textarea"] = str_replace("\n","<br>",$_POST["textarea"]);
>
> When retrieving data from the DB for a textarea use this before displaying:
>
> $_POST["textarea"] = str_replace("<br>","\n",$_POST["textarea"]);
attached mail follows:
i keep the string intact as well, for that exact reason, when you want
to edit dynamically, i dont want all sorts of html tags in my
textarea. So, the solution i found works, is to use the php funtion
nl2br(). use that when displaying the info in html., that way you dont
actually change the original text.
JAson
On Tue, 27 Jul 2004 22:50:44 +0100, Enda Nagle - Lists
<lists
nightsol.net> wrote:
> I usually leave the string intact in the database because if you need to
> show it in an admin area or something, you donıt need to convert it back
> again before populating the text area.
>
> Suppose it just comes down to personal preference... Or is there a specific
> benefit to doing it this way?
>
> Regards
>
> Enda
> --
>
> - + - + - + - + - + - + - + - + - + - + - + - + -
>
> Enda Nagle
> +353 86 168 0774
> enda
category9.com
> www.category9.com
>
> - + - + - + - + - + - + - + - + - + - + - + - + -
>
>
>
>
> On 27/07/2004 22:55, "Matthew Sims" <matt
killermookie.org> wrote:
>
> >> > Hi,
> >> >
> >> > If I have a html textarea for inputting text into a database text field
> >> > how can I keep the formatting of the entered text?
> >> >
> >> > i.e. on the html textarea if the user enters carriage returns i.e. a new
> >> > paragraph I want that to go into the database then when I retrieve it and
> >> > display it on a normal html page I want to keep those carriage returns!
> >> >
> >> > Thanks
> >> >
> >> > Matt
> >
> > Before injecting textarea data into a DB use this:
> >
> > $_POST["textarea"] = str_replace("\n","<br>",$_POST["textarea"]);
> >
> > When retrieving data from the DB for a textarea use this before displaying:
> >
> > $_POST["textarea"] = str_replace("<br>","\n",$_POST["textarea"]);
>
>
attached mail follows:
> i keep the string intact as well, for that exact reason, when you want
> to edit dynamically, i dont want all sorts of html tags in my
> textarea. So, the solution i found works, is to use the php funtion
> nl2br(). use that when displaying the info in html., that way you dont
> actually change the original text.
>
> JAson
>
> On Tue, 27 Jul 2004 22:50:44 +0100, Enda Nagle - Lists
> <lists
nightsol.net> wrote:
>> I usually leave the string intact in the database because if you need to
>> show it in an admin area or something, you donıt need to convert it back
>> again before populating the text area.
>>
>> Suppose it just comes down to personal preference... Or is there a
>> specific
>> benefit to doing it this way?
>>
>> Regards
>>
>> Enda
>> On 27/07/2004 22:55, "Matthew Sims" <matt
killermookie.org> wrote:
>>
>> >> > Hi,
>> >> >
>> >> > If I have a html textarea for inputting text into a database text
>> field
>> >> > how can I keep the formatting of the entered text?
>> >> >
>> >> > i.e. on the html textarea if the user enters carriage returns i.e.
>> a new
>> >> > paragraph I want that to go into the database then when I retrieve
>> it and
>> >> > display it on a normal html page I want to keep those carriage
>> returns!
>> >> >
>> >> > Thanks
>> >> >
>> >> > Matt
>> >
>> > Before injecting textarea data into a DB use this:
>> >
>> > $_POST["textarea"] = str_replace("\n","<br>",$_POST["textarea"]);
>> >
>> > When retrieving data from the DB for a textarea use this before
>> displaying:
>> >
>> > $_POST["textarea"] = str_replace("<br>","\n",$_POST["textarea"]);
I think the reason why I started using the above two lines is becasue I
had created a mailer program for my work where co-workers can send mail
through the website.
Anyway, I was using the function nl2br to handle my newlines/breaks but
when receiving the email through Outlook everything was double spaced. It
turns out that nl2br was inserting a "\r\n" combination.
After some help through Google Groups it was suggested that the two lines
above would pretty much do the same and keep everything intact with
spacing. So it's what I've been using ever since for anything textarea out
of habit. :)
--
--Matthew Sims
--<http://killermookie.org>
attached mail follows:
>> i keep the string intact as well, for that exact reason, when you want
>> to edit dynamically, i dont want all sorts of html tags in my
>> textarea. So, the solution i found works, is to use the php funtion
>> nl2br(). use that when displaying the info in html., that way you dont
>> actually change the original text.
>>
>> JAson
Also, check out the php site regarding the nl2br function and read through
the user comments. Different OSes handle newlines different and nl2br does
it 1 way.
http://us3.php.net/manual/en/function.nl2br.php
And converting with nl2br supposedly takes up more CPU. Doing many nl2br
conversions can run your site/program slow. In some cases, it's better to
convert before injection since disk space is more abundent than CPU
cycles.
--
--Matthew Sims
--<http://killermookie.org>
attached mail follows:
Hi all.
I'm using session variables to identify if a user is authorised, if yes -
display x and so on.
However, I've come across a couple of issues:
when users access a page that's 2 folders deep into the root I.e.
www.mydomain.com/folder1/folder2 any include references I use have to be
absolute instead of relative, has anyone else come across this...?
Also: users are not being authorised even though there's a variable that
says they are. I have verified this by placing a file in folder1 and it
displays fine but if I click a link to access a file in foder2 I get a login
page - I shouldn't. Any ideas...?
--
-----------------------------
Michael Mason
Arras People
www.arraspeople.co.uk
-----------------------------
attached mail follows:
On Tue, 27 Jul 2004 23:21:34 +0100, Harlequin
<michael.mason
arraspeople.co.uk> wrote:
> Hi all.
>
> I'm using session variables to identify if a user is authorised, if yes -
> display x and so on.
>
> However, I've come across a couple of issues:
>
> when users access a page that's 2 folders deep into the root I.e.
> www.mydomain.com/folder1/folder2 any include references I use have to be
> absolute instead of relative, has anyone else come across this...?
>
Relative includes are relative to the "starting" script's location. So
if you have config.php in folder1 and you're accessing folder2, you
have to use ../config.php.
One way to get around this is to have all includes in a central place
and add it to your include_path (This is what I do). I do it through
ini_set, but you could do it through a .htaccess file or the php.ini
much easier.
> Also: users are not being authorised even though there's a variable that
> says they are. I have verified this by placing a file in folder1 and it
> displays fine but if I click a link to access a file in foder2 I get a login
> page - I shouldn't. Any ideas...?
I assume you're calling session_start() in *all* of these pages?
Sessions *will* work across all folders on your website. Or at least
they should. You're not changing domains, right? Like from without
www. to with www.?
>
> --
> -----------------------------
> Michael Mason
> Arras People
> www.arraspeople.co.uk
> -----------------------------
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> !DSPAM:4106d348216571949498371!
>
>
--
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder
paperCrane --Justin Patrin--
attached mail follows:
I found a cool project called Japha which is a port of the main java classes to php. It's at www.japha.net
I haven't used it yet, but have read through the site and the classes a bit. Anyone using these classes/libraries in their applications.
-Brent
attached mail follows:
Hello,
I have a form with a textarea field, I'm trying to eliminate the <enter> keywords that users write on it, what can I do using php? for instance: the original phrase would be: "Hello <enter> world!"
after using a function php must be: "Hello world!".
Thanks
attached mail follows:
if you mean remove the new line characters, then a str_replace('\n',
'', $textbody); should be sufficient. If thats not what you mean,
please clarify.
Jason
On Tue, 27 Jul 2004 18:29:42 -0500, Raúl Castro <ora7
cdmb.gov.co> wrote:
> Hello,
>
> I have a form with a textarea field, I'm trying to eliminate the <enter> keywords that users write on it, what can I do using php? for instance: the original phrase would be: "Hello <enter> world!"
> after using a function php must be: "Hello world!".
>
> Thanks
>
attached mail follows:
On Tue, 27 Jul 2004 18:29:42 -0500, Raúl Castro <ora7
cdmb.gov.co> wrote:
> Hello,
>
> I have a form with a textarea field, I'm trying to eliminate the <enter> keywords that users write on it, what can I do using php? for instance: the original phrase would be: "Hello <enter> world!"
> after using a function php must be: "Hello world!".
>
If you don't want newlines, don't use a textarea.....
But it you really want it:
$text = str_replace(array("\n", "\r"), ' ', $text);
--
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder
paperCrane --Justin Patrin--
attached mail follows:
Anyone have any suggestions as to the best way to keep track of all
users who are logged in at a given time? I thought of writing them to a
temp text file and them deleting the names from the file when a user
logged out, but I think there has to be a better way. Anyone have any
suggestions?
--
Jason Giangrande <jason
giangrande.org>
http://www.giangrande.org
http://www.dogsiview.com
attached mail follows:
On Tue, 27 Jul 2004 19:55:49 -0400, Jason Giangrande
<jason
giangrande.org> wrote:
> Anyone have any suggestions as to the best way to keep track of all
> users who are logged in at a given time? I thought of writing them to a
> temp text file and them deleting the names from the file when a user
> logged out, but I think there has to be a better way. Anyone have any
> suggestions?
>
Save when a user logs in to the DB. Or whenever they access a page.
Clear them out after x minutes and no activity.
--
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder
paperCrane --Justin Patrin--
attached mail follows:
If you have a users table, you could add a field to it that contains
the last login datetime. and query that table for datetimes that are
less then your session timeout (if one exists). Of coarse, you would
have to update that table when a user logs in.
Jason
On Tue, 27 Jul 2004 19:55:49 -0400, Jason Giangrande
<jason
giangrande.org> wrote:
> Anyone have any suggestions as to the best way to keep track of all
> users who are logged in at a given time? I thought of writing them to a
> temp text file and them deleting the names from the file when a user
> logged out, but I think there has to be a better way. Anyone have any
> suggestions?
>
> --
> Jason Giangrande <jason
giangrande.org>
> http://www.giangrande.org
> http://www.dogsiview.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
attached mail follows:
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. Course, if they
had logged off, then they weren't logged on, but on the other side, users
were counted for every session they created, and closing and opening new
browser sessions caused them to be counted multiple times, and continue to
be counted until session "garbage cleanup" removed their session entries,
unless I used the session timestamp in my count algorithm. Session was
nice, because if a user was causing a problem, I could kill his session
entry, effectively logging him off, forcing him to logon again.
Warren Vail
-----Original Message-----
From: Justin Patrin [mailto:papercrane
gmail.com]
Sent: Tuesday, July 27, 2004 5:05 PM
To: Jason Giangrande
Cc: php-general
lists.php.net
Subject: Re: [PHP] Showing all users who are logged in
On Tue, 27 Jul 2004 19:55:49 -0400, Jason Giangrande <jason
giangrande.org>
wrote:
> Anyone have any suggestions as to the best way to keep track of all
> users who are logged in at a given time? I thought of writing them to
> a temp text file and them deleting the names from the file when a user
> logged out, but I think there has to be a better way. Anyone have any
> suggestions?
>
Save when a user logs in to the DB. Or whenever they access a page. Clear
them out after x minutes and no activity.
--
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder
paperCrane --Justin Patrin--
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Hi,
instead of showing my index.php page located at /
I want to show my index.html page located at /cached/
but I dont want to use javascript as the clients JS
might be off...and I dont want to get blacklisted by
the search engines for redirecting...
I did read somewhere that you can redirect via
a .htaccess and NOT get blacklisted by giving out
certain status codes ("document moved permantly"...I
think) I cant find that article searching google, but
since its so useful I'm pretty sure someone else is
using that method, mind helping me out?
Thanks,
Mag
=====
------
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)
_______________________________
Do you Yahoo!?
Express yourself with Y! Messenger! Free. Download now.
http://messenger.yahoo.com
attached mail follows:
Hey,
Dont worry about it, found it:
http://www.thinkhost.com/services/kb/301-redirect.shtml
Thanks,
Mag
=====
------
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail
attached mail follows:
On Wednesday 28 July 2004 04:51, Vern wrote:
> I get:
>
> # wget -O -q http://www.comp-wiz.com/index.html | lpr -P hp1300n
> --16:49:59-- http://www.comp-wiz.com/index.html
> => `-q'
> Resolving www.comp-wiz.com... done.
> Connecting to www.comp-wiz.com[207.234.154.95]:80... connected.
> HTTP request sent, awaiting response... 200 OK
> Length: 22,011 [text/html]
>
> 100%[======================================================================
>> ] 22,011 139.58K/s ETA 00:00
>
> 16:49:59 (139.58 KB/s) - `-q' saved [22011/22011]
>
> lpr: stdin is empty, so no job has been sent.
It would be nice if you did a *little* bit of your own research. If you had a
look at 'wget --help' or 'man wget' you would have found that the '-O' switch
will save contents of URL to file (in this case to the file '-q').
Anyway this is getting completely OT. And as you have indicated in other posts
you wanted to print a copy of the URL "as rendered via a graphical browser".
Neither wget nor lynx or suitable for this task.
> > http://marginalhacks.com/Hacks/html2jpg/
> Seems to me that this needs XWindows or something install, am I incorrect?
You need to install X and probably a few other bits and pieces as well.
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
A good marriage would be between a blind wife and deaf husband.
-- Michel de Montaigne
*/
attached mail follows:
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 -
attached mail follows:
please give me a command line to startup MySQL using safe_mysqld
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.690 / Virus Database: 451 - Release Date: 22/05/2004
attached mail follows:
It depends on your configuration, OS, etc...
> -----Original Message-----
> From: Fitra Alfina [mailto:fit
inscribe.com.my]
> Sent: Tuesday, July 27, 2004 7:37 PM
> To: php-general
lists.php.net
> Subject: [PHP] Urgent..my MYSQL dies..
>
> please give me a command line to startup MySQL using safe_mysqld
attached mail follows:
Fitra Alfina wrote:
> please give me a command line to startup MySQL using safe_mysqld
try the mysql list
--
Raditha Dissanayake.
------------------------------------------------------------------------
http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
attached mail follows:
> please give me a command line to startup
> MySQL using safe_mysqld
C:\>
---John Holmes...
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.690 / Virus Database: 451 - Release Date: 22/05/2004
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
holmes072000
charter.net wrote:
>>please give me a command line to startup
>>MySQL using safe_mysqld
>
>
> C:\>
>
> ---John Holmes...
>
>
HAHAHA How'd you guess they would have a drive letter for their prompt :)
Oh, us poor, poor windows users. Microsoft has "protected" us from it for so
long that we've forgotten what the ol' command prompt looked like!
attached mail follows:
how to restart deamon??
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.690 / Virus Database: 451 - Release Date: 22/05/2004
attached mail follows:
On Wed, 28 Jul 2004 12:49, Fitra Alfina wrote:
> how to restart deamon??
How to ask questions the smart way
http://www.catb.org/~esr/faqs/smart-questions.html
--
David Robley
Dogs come when you call. Cats have answering machines.
attached mail follows:
I can't figure how could i add +7 more days on the DD (Day) value. My
problem is, when the day is close on the end of the month like
07/29/2004
when i add +7 on 29 = 36, its obvious we dont have 36 on the calendar.
And im creating a program below, to explode it and maybe just add +.
But i think its useless if im just going to do + on the DD (Day)
value.
Hmm :?
##
<?php
$curdate = date("Y-m-d");
$plus7 = explode("-", $curdate);
print ("
<p>cut:
" .$plus7[0]. "
" .$plus7[1]. "
" .$plus7[2]. "
</p>
Current Date: $curdate<br>
+7 Dats Date: $plus7
");
?>
##
--
Louie Miranda
http://www.axishift.com
attached mail follows:
On Wed, 28 Jul 2004 11:30:42 +0800, Louie Miranda <lmiranda
gmail.com> wrote:
> I can't figure how could i add +7 more days on the DD (Day) value. My
> problem is, when the day is close on the end of the month like
>
> 07/29/2004
>
> when i add +7 on 29 = 36, its obvious we dont have 36 on the calendar.
> And im creating a program below, to explode it and maybe just add +.
> But i think its useless if im just going to do + on the DD (Day)
> value.
>
> Hmm :?
>
> ##
> <?php
> $curdate = date("Y-m-d");
> $plus7 = explode("-", $curdate);
>
> print ("
> <p>cut:
> " .$plus7[0]. "
> " .$plus7[1]. "
> " .$plus7[2]. "
> </p>
>
> Current Date: $curdate<br>
> +7 Dats Date: $plus7
>
> ");
> ?>
> ##
>
$add7days = date('Y-m-d', strtotime($oldDate) + 7 * 24 * 60 * 60);
--
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder
paperCrane --Justin Patrin--
attached mail follows:
On Wednesday 28 July 2004 11:30, Louie Miranda wrote:
> I can't figure how could i add +7 more days on the DD (Day) value. My
> problem is, when the day is close on the end of the month like
>
> 07/29/2004
>
> when i add +7 on 29 = 36, its obvious we dont have 36 on the calendar.
> And im creating a program below, to explode it and maybe just add +.
> But i think its useless if im just going to do + on the DD (Day)
> value.
strtotime()
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
It is not well to be thought of as one who meekly submits to insolence and
intimidation.
*/
attached mail follows:
Definately check out strtotime() function, way easier than adding up
the seconds of a timestamp, or breaking apart a getdate array.
Jason
On Wed, 28 Jul 2004 11:30:42 +0800, Louie Miranda <lmiranda
gmail.com> wrote:
> I can't figure how could i add +7 more days on the DD (Day) value. My
> problem is, when the day is close on the end of the month like
>
> 07/29/2004
>
> when i add +7 on 29 = 36, its obvious we dont have 36 on the calendar.
> And im creating a program below, to explode it and maybe just add +.
> But i think its useless if im just going to do + on the DD (Day)
> value.
>
> Hmm :?
>
> ##
> <?php
> $curdate = date("Y-m-d");
> $plus7 = explode("-", $curdate);
>
> print ("
> <p>cut:
> " .$plus7[0]. "
> " .$plus7[1]. "
> " .$plus7[2]. "
> </p>
>
> Current Date: $curdate<br>
> +7 Dats Date: $plus7
>
> ");
> ?>
> ##
>
> --
> Louie Miranda
> http://www.axishift.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
attached mail follows:
HAHAHAHHAHA
http://ph.php.net/manual/en/function.strtotime.php
:)
--
Louie Miranda
http://www.axishift.com
attached mail follows:
Hello all,
I have 3 scripts script1.php and script2.php where both include the same
general.inc file of functions. Then I have script3.php that calls
functions from both scritp1.php and script2.php. As both script1 and
script2 include general.inc when I try to use diferent function on
script3 I have a circular problem that functions on general.inc are
declared twice. Therefore, how can I solve this circular include
problem? Can anyone help me? In C++ you have the pragma keyword to
avoid this. What can be done in PHP?
When I do a include_once() the problem stays the same.
Thanks in advance.
Here's the scenario in case what I wrote is complicated.
script1.php :
<?php
include("general.inc");
functions......
?>
script2.php :
<?php
include("general.inc");
functions......
?>
script3.php :
<?php
include("script1.php");
include("script2.php");
call script1 functions
call script2 functions
functions......
?>
attached mail follows:
I *believe* that include_once will be all that is necessary. However if that
doesn't stop the problem, you can use a DEFINE and at the top of each script:
if (!defined(FILE1)) {
include_once 'file1.php';
}
---------- file1.php -------------
define ('FILE1', TRUE);
attached mail follows:
Hi Everyone,
I am looking for a tool that lets me do simple data managment ie.
edit,update,insert and delete records in tables of a database.
I am kinda fed up of writing those php scripts for back ends of
websites over and over :). I am looking for some thing generic to
replace that if possible.
PhpMyAdmin is a great tool but I don't want the user to have access to
drop table and empty table etc. I cannot change the permissions of
MySQL user.
Jas
attached mail follows:
On Tue, 27 Jul 2004 22:09:35 -0700 (PDT), Jaskirat Singh
<jaskirat_singh
yahoo.com> wrote:
> Hi Everyone,
> I am looking for a tool that lets me do simple data managment ie.
> edit,update,insert and delete records in tables of a database.
>
> I am kinda fed up of writing those php scripts for back ends of
> websites over and over :). I am looking for some thing generic to
> replace that if possible.
>
> PhpMyAdmin is a great tool but I don't want the user to have access to
> drop table and empty table etc. I cannot change the permissions of
> MySQL user.
>
<fanfare>
Bum bu da bah!
</fanfare>
Enter DB_DataObject_FormBuilder and its simple, yet powerful frontend.
For more info:
http://pear.php.net/package/DB_DataObject_FormBuilder
http://opensource.21st.de/tiki-index.php?page=DB_DataObject_FormBuilder
http://www.reversefold.com/tikiwiki/tiki-index.php?page=DB_DataObject_FormBuilder_Frontend
If you need help using DataObject, FormBuilder, or the frontend, don't
hesitate to ask for help.
--
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder
paperCrane --Justin Patrin--
attached mail follows:
You can also use an application called CodeCharge. It's very easy to use.
By the way are you living in India or abroad??
Harmeet
"Jaskirat Singh" <jaskirat_singh
yahoo.com> wrote in message
news:20040728050935.6030.qmail
web11508.mail.yahoo.com...
> Hi Everyone,
> I am looking for a tool that lets me do simple data managment ie.
> edit,update,insert and delete records in tables of a database.
>
> I am kinda fed up of writing those php scripts for back ends of
> websites over and over :). I am looking for some thing generic to
> replace that if possible.
>
> PhpMyAdmin is a great tool but I don't want the user to have access to
> drop table and empty table etc. I cannot change the permissions of
> MySQL user.
>
> Jas
attached mail follows:
I'm working on a project that makes use of the DOMXPath class in PHP5. I have
some test xml documents / queries, but it would be good to test my project with
other people's documents / xpath queries that do things mine don't. Please
reply off list though, since I doubt most of the people here want a bunch of XML
documents in their inbox.
I'm probably going to regret this request... but what the heck.
attached mail follows:
Hi
I am doing a search in the database and would like to limit the display to x numbers only. But would like to put two links next and previous. Where they click to goto next page.
Say there were 28 results returned by query but i want to display 5 on first and subsequent pages. The way I do this is to run two identical queries. First one queries the search string and I get total number of results, then I work out mathematically how many pages will be needed and then create the links on Next and Previous with appropriate page numbers.
My database is only 50-60 records but I estimate it to reach a few hundred to even a couple of thousand. Would doing double queries put unnecessary load on my server?
What other ways or techniques are there for doing this?? Any suggestions
Regards
Harry
attached mail follows:
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: ./txt/test.txt
What I want to do is to extract the value(s) after inflating, so that I
can check what was extracted from the zip. The reason why I cannot use
the PHP zip functions is that I have to use a different decompressing
utility other than unzip which outputs a different thing. Depending on
what is output then I can decide what tool to use.
So I need to extract test.txt from the string above. How can I do it?
Sometimes the unzip utility is not compatible with the zip file because
it might be proprietary. Therefore I will call pkzipc instead of unzip.
Whenever I have the string from executing unzip :
Archive: proprietary.zip
skipping: proprietary.txt `shrink' method not supported
Now, instead of inflating I have skiping because I cannot unzip this zip
file with the free unzip utility, instead I call pkzipc and I then suceed:
pkunzip proprietary.zip
PKZIP(R) Version 6.0 FAST! Compression Utility for Linux X86
Copyright 1989-2002 PKWARE Inc. All Rights Reserved. Evaluation Version
PKZIP Reg. U.S. Pat. and Tm. Off. Patent No. 5,051,745
Extracting files from .ZIP: pv0551.zip
Unshrinking: proprietary.txt
Therefore, what I need help with is to analyze the $stdout variable:
If that contains inflating I need to know what was decompressed. If
contains skipping then I must call this function using pkzipc instead.
Then I must extract whatever value after Unshrinking:
Can anyone help?
Thanks in advance.
attached mail follows:
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 split command the split up the output from the shell command
into an array. then you can do a string comparision on each element -
less elegent but easier to master if you are not familiar with regular
expressions.
--
Raditha Dissanayake.
------------------------------------------------------------------------
http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
attached mail follows:
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 quality operation, fast payouts,
generous bonuses, and super friendly around-the-clock
customer support.
Click here: http://bigbonus-casino.com
Best regards,
Jamie Zawinsky
No thanks: http://bigbonus-casino.com/u/
attached mail follows:
"Justin Patrin" <papercrane
gmail.com> wrote in message
news:432beae04072614409292b83
mail.gmail.com...
> Edit locally and FTP manually.
>
> Or get some kind of mounted FTP filesystem....doesn'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 gem I may add.
rush
--
http://www.templatetamer.com/
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]