php-general Digest 22 Dec 2001 12:52:57 -0000 Issue 1067
Topics (messages 78533 through 78562):
spliti
78533 by: Yamin Prabudy
78534 by: Brian Clark
78550 by: George Nicolae
oscommerce / Exchange project
78535 by: Daniel Guerrier
78537 by: Kurt Lieber
Config Problems
78536 by: Ben Ocean
78538 by: Brian Clark
78539 by: Brian Clark
78549 by: Ben Ocean
session class
78540 by: Christian Haines
78541 by: Yasuo Ohgaki
Ensuring that Form is only submitted once (session vars?)
78542 by: Andrew V. Romero
78547 by: Steven Cayford
Email files as attachments
78543 by: Andrew V. Romero
78553 by: George Nicolae
Re: web server crashing with either 4.1.0 or 4.0.6
78544 by: Yasuo Ohgaki
Re: Limit script memory usage !!
78545 by: Yasuo Ohgaki
"Talkback" or community type participation.....
78546 by: Deron
./configure error. won't let me continue...
78548 by: Joelmon2001.aol.com
might be serious .. might be not ...
78551 by: nOop
Does mail() can be used to send attachments?
78552 by: Dasmeet Singh Arora
78555 by: Philip Olson
78556 by: George Nicolae
Re: SSI
78554 by: Philip Olson
php pop3 checker
78557 by: M.E. Suliman
78558 by: Bogdan Stancescu
78561 by: Michael Jurgens
Function definition: how to make default argument an empty array?
78559 by: Michael Jurgens
78560 by: Bogdan Stancescu
Re: spliti[SOLUTION]
78562 by: Bharath Bhushan Lohray
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 ---
hi guys,
I need help here.
I got this
$line = "no more words to say";
then I want to split them all I used
spliti(" ",$line);
Then want to print it out say
echo $word[0] $word[1] $word[$i];
how can I do this..
Thanks in Advance
--- End Message ---
--- Begin Message ---
* Yamin Prabudy ([EMAIL PROTECTED]) [Dec 21. 2001 23:17]:
> $line = "no more words to say";
> then I want to split them all I used
> spliti(" ",$line);
http://www.php.net/explode
> Then want to print it out say
> echo $word[0] $word[1] $word[$i];
http://www.php.net/foreach
or 3.x, use a while() with:
http://www.php.net/list
http://www.php.net/each
> how can I do this..
> Thanks in Advance
HTH.
--
Brian Clark | Avoiding the general public since 1805!
Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
It's been lovely, but I have to scream now.
--- End Message ---
--- Begin Message ---
$word=exlode(" ",$line);
--
Best regards,
George Nicolae
IT Manager
___________________
X-Playin - Professional Web Design
www.x-playin.f2s.com
"Yamin Prabudy" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> hi guys,
> I need help here.
> I got this
> $line = "no more words to say";
>
> then I want to split them all I used
>
> spliti(" ",$line);
>
> Then want to print it out say
> echo $word[0] $word[1] $word[$i];
>
> how can I do this..
>
> Thanks in Advance
--- End Message ---
--- Begin Message ---
Does anyone have any experience using this thing.
I installed it and it seems to work, but it's very
buggy.
After the first hit the left nav, footer no longer
appear. I know this a bad description of the problem
but there's no rhyme nor reason to this.
__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com
--- End Message ---
--- Begin Message ---
On Friday 21 December 2001 08:56 pm, Daniel Guerrier wrote:
> Does anyone have any experience using this thing.
> I installed it and it seems to work, but it's very
> buggy.
Yes, I've used it fairly extensively. I haven't found it to be nearly as
buggy as your message implies. It's not perfect, but it's certainly bug-free
enough to use on the two live shops I'm running.
> After the first hit the left nav, footer no longer
> appear. I know this a bad description of the problem
> but there's no rhyme nor reason to this.
I'm guessing you have a config error or something else munged up with your
PHP installation and/or TEP config file. TEP is fussy about a few php.ini
options, such as session_autostart and magic quotes.
Have you tried posting a message to the TEP-GENERAL list? It's probably a
better resource for TEP-specific questions.
--kurt
--- End Message ---
--- Begin Message ---
Hi;
I'm installing php from source and I've run into these config errors:
configure: error: Cannot find OpenSSL's <evp.h>
/usr/local/bin/config_php: --with-kerberos=/usr/krb5-1.2.2: No such file or
directory
/usr/local/bin/config_php: --with-ldap=/usr/local/openldap-2.0.18: No such
file or directory
Here's my config script:
#!/bin/sh
cd /usr/local/php
./configure --with-apache=/usr/src/redhat/SOURCES/apache \
--with-openssl=/usr/share/doc/openssl \
--with-kerberos=/usr/krb/ \
--with-imap-ssl=/usr/share/doc/openssl \
--with-ldap=/usr/local/openldap/ \
--with-mysql=/usr/local/mysql
exit 0
I've also tried the *openssl* part pointing to /usr/include/openssl which
is where evp.h lives. Why these bizarre errors when the pointers point to
files that exist?
TIA,
BenO
--- End Message ---
--- Begin Message ---
* Ben Ocean ([EMAIL PROTECTED]) [Dec 22. 2001 00:01]:
> Hi;
Howdy.
> I'm installing php from source and I've run into these config errors:
[...]
> Here's my config script:
> #!/bin/sh
> cd /usr/local/php
> ./configure --with-apache=/usr/src/redhat/SOURCES/apache \
> --with-openssl=/usr/share/doc/openssl \
Try --with-openssl=/usr or --with-openssl=/usr/local
> --with-kerberos=/usr/krb/ \
Try --with-kerberos=/usr
> --with-imap-ssl=/usr/share/doc/openssl \
--with-imap-ssl=/usr or --with-openssl=/usr/local
> --with-ldap=/usr/local/openldap/ \
Probably --with-ldap=/usr here
> --with-mysql=/usr/local/mysql
--with-mysql=/usr/local
> exit 0
> I've also tried the *openssl* part pointing to /usr/include/openssl which
> is where evp.h lives. Why these bizarre errors when the pointers point to
For that, =/usr is probably what you want. It just wants to base path
usually; it should know to look in include.
--
Brian Clark | Avoiding the general public since 1805!
Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
All civilizations become either spacefaring or extinct.
--- End Message ---
--- Begin Message ---
* Brian Clark ([EMAIL PROTECTED]) [Dec 22. 2001 00:09]:
> > --with-ldap=/usr/local/openldap/ \
> Probably --with-ldap=/usr here
Whoops. For ldap, I meant --with-ldap=/usr/local according to what you
said.
[...]
> For that, =/usr is probably what you want. It just wants to base path
> usually; it should know to look in include.
"...it just wants THE base path.."
The. The base path. <g>
--
Brian Clark | Avoiding the general public since 1805!
Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
All you will ever be you are now becoming.
--- End Message ---
--- Begin Message ---
None of these suggestions worked. So...what's wrong with this config script
that it throws these errors?
configure: error: Cannot find OpenSSL's <evp.h>
/usr/local/bin/config_php: --with-kerberos=/usr/krb5-1.2.2: No such file or
directory
/usr/local/bin/config_php: --with-ldap=/usr/local/openldap-2.0.18: No such
file or directory
Here's my config script:
#!/bin/sh
cd /usr/local/php
./configure --with-apache=/usr/src/redhat/SOURCES/apache \
--with-openssl=/usr/include/openssl \
--with-kerberos=/usr/krb/ \
--with-imap-ssl=/usr/include/openssl \
--with-ldap=/usr/local/openldap/ \
--with-mysql=/usr/local/mysql
exit 0
At 12:07 AM 12/22/01 -0500, you wrote:
>* Ben Ocean ([EMAIL PROTECTED]) [Dec 22. 2001 00:01]:
>
> > Hi;
>
>Howdy.
>
> > I'm installing php from source and I've run into these config errors:
>
>[...]
>
> > Here's my config script:
>
> > #!/bin/sh
> > cd /usr/local/php
> > ./configure --with-apache=/usr/src/redhat/SOURCES/apache \
> > --with-openssl=/usr/share/doc/openssl \
>
>Try --with-openssl=/usr or --with-openssl=/usr/local
>
> > --with-kerberos=/usr/krb/ \
>
>Try --with-kerberos=/usr
>
> > --with-imap-ssl=/usr/share/doc/openssl \
>
>--with-imap-ssl=/usr or --with-openssl=/usr/local
>
> > --with-ldap=/usr/local/openldap/ \
>
>Probably --with-ldap=/usr here
>
> > --with-mysql=/usr/local/mysql
>
>--with-mysql=/usr/local
>
> > exit 0
>
> > I've also tried the *openssl* part pointing to /usr/include/openssl which
> > is where evp.h lives. Why these bizarre errors when the pointers point to
>
>For that, =/usr is probably what you want. It just wants to base path
>usually; it should know to look in include.
>
>--
>Brian Clark | Avoiding the general public since 1805!
>Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
>All civilizations become either spacefaring or extinct.
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
(sorry if this has been posted a thousand times..i am having problems
posting)
hi all,
how does one access and manipulate session variables from within a class?
i have hunted the net high and low but received no relief.
i have tried (where error is a session variable)
class test
{
var $global['error'];
}
class test
{
var $HTTP_SESSION_VARS['error'];
}
class test
{
session_register("error");
var $error;
}
all to no avail.
please help!
many thanks in advance,
christian
--- End Message ---
--- Begin Message ---
Christian Haines wrote:
> (sorry if this has been posted a thousand times..i am having problems
> posting)
>
> hi all,
>
> how does one access and manipulate session variables from within a class?
> i have hunted the net high and low but received no relief.
>
> i have tried (where error is a session variable)
>
> class test
> {
> var $global['error'];
> }
This is wrong.
>
> class test
> {
> var $HTTP_SESSION_VARS['error'];
> }
This is wrong thing to do also
> class test
> {
> session_register("error");
> var $error;
> }
>
This is also wrong, too....
Try to find example code. There are many of them on net.
--
Yasuo Ohgaki
--- End Message ---
--- Begin Message ---
I was wondering if there is a way to ensure that a form is only
submitted once. I have a script that saves a lot of information to the
disk and if the user uses the back button and then resubmits the form,
it will cause major problems. I jave looked into using javascript to
fix this, but it doesn't seem like there is an easy way using
javascript. In the process of looking into this, someone recommended
using a session variable. I have never used sesion variables, but tried
a sample code in the documentation:
<?php
session_register ("count");
$count++;
?>
Hello visitor, you have seen this page <?php echo $count; ?> times.<p>
<php?
# the <?=SID?> is necessary to preserve the session id
# in the case that the user has disabled cookies
?>
To continue, <A HREF="nextpage.php?<?=SID?>">click here</A>
but I get an error saying "Warning: Cannot send session cookie - headers
already sent by (output started at
c:\server\apache\htdocs\session.phtml:5)" and "Warning: Cannot send
session cache limiter - headers already sent (output started at
c:\server\apache\htdocs\session.phtml:5) in
c:\server\apache\htdocs\session.phtml".
So two questions, first is a sesssion variable the way to go in ensuring
that the user doesn't use the back button to resubmit a form, and
secondly why am I getting this errors when I just cut and paste the
example code into a sample page?
Thanks for any direction and help,
Andrew V. Romero
--- End Message ---
--- Begin Message ---
Your first reference to a session (usually session_start()) must come
before any html is sent to the browser. A common problem is to have some
white space before the <?php tag or after the ?> tag in a preceding file.
You can set up something like what you're working on using session
variables. Create random numbers and stick them in each form as a hidden
input with the name formId or something. Then register an array of used
formId's as a session variable. At the top of each script check if there's
a formId and if so see if it's in the used ids array. If so you can chuck
out the form input, if not, the form's ok, but add the new formId to the
used ids array.
This should at least keep someone from re-submitting a form in the same
session.
-Steve
On 2001.12.22 00:09:30 -0600 Andrew V. Romero wrote:
> I was wondering if there is a way to ensure that a form is only
> submitted once. I have a script that saves a lot of information to the
> disk and if the user uses the back button and then resubmits the form,
> it will cause major problems. I jave looked into using javascript to
> fix this, but it doesn't seem like there is an easy way using
> javascript. In the process of looking into this, someone recommended
> using a session variable. I have never used sesion variables, but tried
> a sample code in the documentation:
> <?php
> session_register ("count");
> $count++;
> ?>
> Hello visitor, you have seen this page <?php echo $count; ?> times.<p>
> <php?
> # the <?=SID?> is necessary to preserve the session id
> # in the case that the user has disabled cookies
> ?>
> To continue, <A HREF="nextpage.php?<?=SID?>">click here</A>
>
> but I get an error saying "Warning: Cannot send session cookie - headers
> already sent by (output started at
> c:\server\apache\htdocs\session.phtml:5)" and "Warning: Cannot send
> session cache limiter - headers already sent (output started at
> c:\server\apache\htdocs\session.phtml:5) in
> c:\server\apache\htdocs\session.phtml".
>
> So two questions, first is a sesssion variable the way to go in ensuring
> that the user doesn't use the back button to resubmit a form, and
> secondly why am I getting this errors when I just cut and paste the
> example code into a sample page?
>
> Thanks for any direction and help,
> Andrew V. Romero
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
--- End Message ---
--- Begin Message ---
I was wondering if it is possible to attach a file using the php mailing
functions? I currently am using
mail("[EMAIL PROTECTED]","My email subject Line",$emailMessage,
"From: [EMAIL PROTECTED]\nReply-To: [EMAIL PROTECTED]\nX-Mailer: PHP/" .
phpversion());
to email simple messages, but I haven't run across a way to attach a
file to it.
Thanks for any information,
Andrew V. Romero
--- End Message ---
--- Begin Message ---
look at http://phpmailer.sourceforge.net for a useful class.
--
Best regards,
George Nicolae
IT Manager
___________________
X-Playin - Professional Web Design
www.x-playin.f2s.com
"Andrew V. Romero" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I was wondering if it is possible to attach a file using the php mailing
>
> functions? I currently am using
> mail("[EMAIL PROTECTED]","My email subject Line",$emailMessage,
> "From: [EMAIL PROTECTED]\nReply-To: [EMAIL PROTECTED]\nX-Mailer: PHP/" .
> phpversion());
> to email simple messages, but I haven't run across a way to attach a
> file to it.
> Thanks for any information,
> Andrew V. Romero
>
--- End Message ---
--- Begin Message ---
Ian McNish wrote:
> when trying at access any php scripts my web server is crashing. i'm
> experiencing this problem with both php 4.0.6 and 4.1.0 on iplanet
> enterprise 6.0sp1 on solaris 8. my web server is logging the following
> error:
>
> catastrophe (21929): Server crash detected (signal SIGSEGV)
> info (21929): Crash occurred in NSAPI SAF php4_execute
> info (21929): Crash occurred in function _pthread_mutex_lock from module
> /usr/lib/libthread.so.1
>
>
> i'm getting this behavior with php code as simple as:
>
> <?php
> phpinfo();
> ?>
>
>
> any help would be appreciated.
>
Visit http://bugs.php.net/ and read *carefully* how to report bug.
There is link for "How to generate back trace". Make sure you
paste backtrace to your bag report.
--
Yasuo Ohgaki
--- End Message ---
--- Begin Message ---
Nicolas Guilhot wrote:
> Hi all,
> I need to limit the amount of memory that a script can use. Is there a
> function that I can use to tell the script to die if its memory usage
> becomes greater than $MAX_MEMORY ! Or maybe, I could use a cron job to
> monitor processes and kill them if they become too big ?
>
> Thanks for your help.
>
Enable memory limit when you configure (--enable-memory-limit)
Read php.ini-dist/recommended.
--
Yasuo Ohgaki
--- End Message ---
--- Begin Message ---
Hi there!
I have this script I just made based on a tutorial I found online and was
wondering if there was a better way to do this or not. Everything works
great so far except for a couple little things. Once the $submit is clicked
and runs the INSERT data into the table... I am looking to be able to have
the page auto refresh and display the new entry as well as the form again.
Here's my current code: (I have this built into the main review page via an
include. The entire page can be viewed here:
http://www.metalages.com/2002/reviews/reviews-test.php?band=Evergrey&album=I
n%20Search%20of%20Truth
Feel free to post a dummy message, nothing is live yet, all in test mode :)
you'll notice once the entry is submitted also, if you try to refresh the
page it wants to readd the data again. any help or guidance appreciated, I
am a self professed "still learning this stuff"! kinda guy.
<?php
if ($submit) {
// Process Form
$DBconn = mysql_connect("localhost", "user", "pass");
mysql_select_db("databasename", $DBconn);
if (!$DBconn) {
echo( "<p>Unable to connect to the " .
"database server at this time.</p>" );
exit();
}
$sql = "INSERT INTO talkback (band_id, album_id,
talkback_name,talkback_email,talkback_comments) VALUES
('$currentid[0]','$currentid[1]','$talkback_name','$talkback_email','$talkba
ck_comments')";
$result = mysql_query($sql);
echo "Thank you! Information entered.\n";
} else {
// display form
?>
<form method="post" action="<?php echo "$PHP_SELF" . "?band=$band" .
"&album=$album"?>">
<div align="center"><b>Name/Nickname:</b><br>
<input type="Text" name="talkback_name"><br>
<b>Email (optional):</b><br>
<input type="Text" name="talkback_email"><br>
<b>Comments:</b><br>
<textarea name="talkback_comments" cols="50" rows="5"></textarea>
<br>
<input type="Submit" name="submit" value="Speak Your Metal!">
</div>
</form>
<?php
} // end if
?>
Deron
www.metalages.com
--- End Message ---
--- Begin Message ---
Hello. I am trying to
./configure
and I have many options I want to add. I receive an error which is further
below. It comes after I type this endless ./configure which you see below as
shown via telnet:
[root@www php-4.0.5]# ./configure --enable-bcmath --enable-ftp \
--enable-safe-mode --with-gd=/usr/local --enable-gd-native-ttf \
--with-jpeg-dir=/usr/local --with-png-dir=/usr/local --with-ming \
--with-freetype-dir=/usr/local --with-t1lib=/usr/local \
--with-mysql=/usr/local/mysql --with-pgsql=/usr/local/pgsql \
--with-ttf=/usr/local --enable-shared-pdflib --enable-magic-quotes \
--with-zlib-dir=/usr/local
***ERROR IS:***
configure: error: can only configure for one host and one target at a time
What does this mean? WHy do all examples I see format the options like this,
yet it won't work for my raq 3? Is there a solution? I simply want to
./configure all at the same time so I can install this puppy (Php4)
Thanks
Joel
--- End Message ---
--- Begin Message ---
A post I found on a forum, maybe this thing is worth reading ... there are 2
parts from this same guy ... read below ...
################
This might be long but shows something I must have missed ... and I'm sure
the solution is simple
On a Plesk intel sys I am having this serious problem that might affect any
form posting page (years back this was a classic DOS attack but Apache has
patched this ages ago )
---
Simple php script that does simple select * from (page is a total of 30k so
needs couple of seconds loading). A Form on that page submits on itself.
Pressing regularly the Submit button acts as usual (page returns ok). You
can see the rest ... banging like crasy on that Submit creates a fifo Mysql
Sleep queue and blocks connections with apache .
*** Now wait .. dont answer yet this is tougher than that ***
_pconnect or _connect have the same effect
I placed php non persistent .. the same
Apache keep_alive=Off .. the same
Mysqld variables wait_timeout was reduced (I saw the sleep status by
mysqladmin, and the growing sleep threads). After this timeout the sleep
threads were killed but ressources not freed. Same thig with wait_timeout.
So I got serious ... netstat shows that on every mysql sleep a socket was
opened with the script (thats just the way it should be since a child forks
on the page) but the child stays at TIME_WAIT or some ACK state. Seems as if
apache cant detect closed socket from client (pipe sig or whatever)
* mysqld restart WONT free the connections (it's apache's fault)
* httpd restart does the trick since all blocking children are killed and
the browser behaves as usual (reproducing every time the stuff above)
* mod_throttle also does the trick since I limit to 1 Concurrent
connection.. but that sux
I have been on this for 14 hours now without coffee or sweets , so please
someone tell me the one and only line i have to place in a config file to
resolve this mess
thanx
----
Configs are :
php 4.0.6 (basic Plesk install)
Apache 1.3.19 (Plesk install)
mod_perl, mod_throttle, mod_php4, mod_frontpage, mod_ssl, mod_setenvif,
mod_so, mod_unique_id, mod_usertrack, mod_headers, mod_expires,
mod_cern_meta, mod_proxy, mod_digest, mod_auth_dbm, mod_auth_anon, mod_auth,
mod_access, mod_rewrite, mod_alias, mod_userdir, mod_speling, mod_actions,
mod_imap, mod_asis, mod_cgi, mod_dir, mod_autoindex, mod_include, mod_info,
mod_status, mod_negotiation, mod_mime, mod_mime_magic, mod_log_config,
mod_define, mod_env, mod_vhost_alias, http_core
Mysql 3.23.36
################
The second post :
################
I ripped inside out that script and got out of it what follows for people
who want to know :
the _connect is done in an include file, look at the snip here :
******
include();
mysql_query();
print(); // 16k long
The blocking happens with the above
******
When I make the _connect inside the same script file (without include() ), I
NO longer get the apache blocking but my TCP stack continues growing with
CLOSE_WAIT sockets (one for each reload)... totaly nuts since it's the same
thing as before but mysql does no longer queue sleep threads .. this is
outerspace...
BETTER :
when i reduce that print() of 16k to less (like 1 k)
I NO longer get socket CLOSE_WAITS and all works ok
What it means to me :
Under mod_php if all buffer flushes have not been done before a die()
(another reload) and another apache fork is made (or child select()),
ressources are NOT freed. To make sure of this I placed a
mysql_close();sleep(2) just before the long print().
mod_php had then the time to close much more sockets than if I left the
sleep(2) out.. but still some CLOSE_WAITS were maid.
All this was on IE and Netscape. The problem is as you said, If I get a DOS
attack my comp will die, even worse If I have huge hits since TCP stack will
reach MaxClients and apache will refuse connect().
That's it
--- End Message ---
--- Begin Message ---
Is it possible to send attachments using mail() command? If yes then how
is it done.
Thanks for any help.
--
http://www.pluginjokes.com
Add FREE Dynamic Jokes To Your Site!
--- End Message ---
--- Begin Message ---
see:
http://www.php.net/manual/en/function.mail.php
a link to a tutorial/rfc exists there. also, check the various script
archives for mail packages, most allow for attatchments.
regards,
Philip Olson
On 22 Dec 2001, Dasmeet Singh Arora wrote:
> Is it possible to send attachments using mail() command? If yes then how
> is it done.
> Thanks for any help.
>
>
>
>
>
>
> --
> http://www.pluginjokes.com
> Add FREE Dynamic Jokes To Your Site!
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
--- End Message ---
--- Begin Message ---
look at http://phpmailer.sourceforge.net for a useful class.
--
Best regards,
George Nicolae
IT Manager
___________________
X-Playin - Professional Web Design
www.x-playin.f2s.com
"Dasmeet Singh Arora" <[EMAIL PROTECTED]> wrote in message
1009010971.1987.7.camel@linux">news:1009010971.1987.7.camel@linux...
> Is it possible to send attachments using mail() command? If yes then how
> is it done.
> Thanks for any help.
>
>
>
>
>
>
> --
> http://www.pluginjokes.com
> Add FREE Dynamic Jokes To Your Site!
--- End Message ---
--- Begin Message ---
Things you can do:
a) rewrite SSI as PHP
b) rewrite SSI as PHP
c) try using virtual()
d) include them via http, like with file() or include() or fopen()
(a) and (b) are preferred, (c) will work as will (d) and most likely [e-z]
:) Also, search through the archives for other advice on the matter:
http://marc.theaimsgroup.com/?l=php-general&s=SSI
Essentially you can't mingle SSI/PHP code in one file as the web server
wants to parse a given extension as, in this case, PHP. PHP can do
anything SSI can do, and then a great deal more.
Read about predefined variables and include() in php manual too.
Regards,
Philip Olson
On Fri, 21 Dec 2001 [EMAIL PROTECTED] wrote:
> if you have a PHP page and you want to use SSI in it... is there a special
> method?
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
--- End Message ---
--- Begin Message ---
Hi
I need to create a way for users to a site to check existing POP3 mail
accounts, and fulfill all the regular webmail functions. Anyone know how if
there are anywhere I could look for a start. I would prefer if it is in
PHP.
Thanks in advance
Mohamed
--- End Message ---
--- Begin Message ---
Check these out:
http://www.horde.org/imp/
http://twig.screwdriver.net/
Also, make sure you search Google for security problems on them - I think IMP
used to have some, but they seem to have fixed them since.
"M.E. Suliman" wrote:
> Hi
>
> I need to create a way for users to a site to check existing POP3 mail
> accounts, and fulfill all the regular webmail functions. Anyone know how if
> there are anywhere I could look for a start. I would prefer if it is in
> PHP.
>
> Thanks in advance
>
> Mohamed
--- End Message ---
--- Begin Message ---
Or try Popper, a nice standard webmail solution written in PHP.
It must be on freshmeat.net
Michael
"Bogdan Stancescu" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Check these out:
> http://www.horde.org/imp/
> http://twig.screwdriver.net/
>
> Also, make sure you search Google for security problems on them - I think
IMP
> used to have some, but they seem to have fixed them since.
>
> "M.E. Suliman" wrote:
>
> > Hi
> >
> > I need to create a way for users to a site to check existing POP3 mail
> > accounts, and fulfill all the regular webmail functions. Anyone know
how if
> > there are anywhere I could look for a start. I would prefer if it is in
> > PHP.
> >
> > Thanks in advance
> >
> > Mohamed
>
--- End Message ---
--- Begin Message ---
Hi,
As you all may know, this is how you set an optional second argument, that
defaults to acidophilus
function makeyogurt ($flavour, $type = "acidophilus")
{ }
I'm now looking for a way to have the second (optional) argument be an array
of strings. I can't get it to work though...
In pseudo-code:
function makeyogurt ($flavour, $type = 'EMPTY ARRAY')
{ }
Any help would be much appreciated,
Michael
--- End Message ---
--- Begin Message ---
Can't test it now, but have you tried
function makeyogurt ($flavour, $type = list())
I assume you need it to be an array because you want to either walk it or, more
likely, perform an in_array() test on it and you found that passing non-array
variables to in_array issues an error. If initializing as an array doesn't work
you can always do this:
function makeyogurt ($flavour, $type = "") {
while ((is_array($type)) && (list($key,$val)=each($type)))
{
[loop]
}
}
or this:
function makeyogurt ($flavour, $type = "") {
if ((is_array($type)) && (in_array("strawberry_yoghurt",$type)))
{
[loop]
}
}
or use the stone-age method:
function makeyogurt ($flavour, $type = "") {
if (@in_array("strawberry_yoghurt",$type))
{
[loop]
}
}
Bogdan
Michael Jurgens wrote:
> Hi,
>
> As you all may know, this is how you set an optional second argument, that
> defaults to acidophilus
>
> function makeyogurt ($flavour, $type = "acidophilus")
> { }
>
> I'm now looking for a way to have the second (optional) argument be an array
> of strings. I can't get it to work though...
>
> In pseudo-code:
>
> function makeyogurt ($flavour, $type = 'EMPTY ARRAY')
> { }
>
> Any help would be much appreciated,
> Michael
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
<?php
$line = "no more words to say";
$word=spliti(" ",$line);
echo "$word[0] $word[1] $word[3]";
?>
Tested and works
--- End Message ---