Re: how to write simple scripts
| From: | Alan Tu | Date: | Fri, 20 Oct 2000 16:22:00 +0000 |
| Subject: | Re: how to write simple scripts | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-21418@lists.php.net to get a copy of this message | ||
No, you can use PHP as you described. I asked a related question about my
wintel machine yesterday. Yesterday I came across an article on PHP and
shell, but I can't find the ref right now. First of all, when you run
mail(), be sure your settings are set in the [mail] section of php.ini.
Also, run php with the -q switch. That will surpress the HTML headers. Hope
this helps.
Alan
----- Original Message -----
From: "Nicolas Windpassinger - Sun Microsystems"
<nicolas.windpassinger@sun.com>
Cc: <php-general@lists.php.net>
Sent: Friday, October 20, 2000 9:17 AM
Subject: [PHP]how to write simple scripts
> HI all,
> I have used a lot php in html forms, but is it possible to use a php
script
> like a normal shell or perl one.
> I have been trying with a little example:
>
> example.php :
>
> #!/space/server/apache_1.3.12/src/modules/
> <?
> $name="nico";
> $age="32";
> $suggestion="toto";
> $mail_id="12";
> $text="blabla";
>
> $title = 'Mail Form';
> $msg = 'Name: '.$name."\n";
> $msg .= 'Age: '.$age."\n";
> $msg .= 'Suggestions: '."\n".$suggestions."\n";
> $msg .= 'Mail ID: '.$mail_id."\n";
> $msg .= 'Text: '."\n".$text."\n";
>
> mail('nicolas.windpassinger@sun.com',$title,$msg,'From: Whoever
> <someone@somewhere.com>');
>
> ?>
>
> then go onto my shell command and do: example.php
>
> I don't know where the problem comes from:-is php only a html embedded
> language?
>
> -maybe my path is wrong! i also tried with ../modules/php4
>
> -the problem should not be the mail. this is just a simple example, but i
> would like to have this one right to get on more funny stuff.
>
> tx,
> nicolas
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>