Re: how to write simple scripts
| From: | Chris Carbaugh | Date: | Fri, 20 Oct 2000 15:29:12 +0000 |
| Subject: | Re: how to write simple scripts | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-21407@lists.php.net to get a copy of this message | ||
You need to compile PHP as a CGI or stand alone executable.
Just leave of the --with-apxs or whatever directive you used to compile
the module. By default (php4.0.1+) the PHP executable is installed to
/usr/local/bin/php
Chris
On Fri, 20 Oct 2000, Nicolas Windpassinger - Sun Microsystems wrote:
> Date: Fri, 20 Oct 2000 16:17:39 +0200
> From: Nicolas Windpassinger - Sun Microsystems
> <nicolas.windpassinger@sun.com>
> 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
>