RE: [PHP]how to write simple scripts
| From: | Ralph Guzman | Date: | Wed, 25 Oct 2000 02:58:27 +0000 |
| Subject: | RE: [PHP]how to write simple scripts | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-21954@lists.php.net to get a copy of this message | ||
in Linux, if you have the Lynx Browser, try this:
lynx -dump http://www.yourdomain.com/example.phtml
notice that the script would have to be within your web server root
directory.
I think the only other alternative is to run php as a cgi. Only then would
you be able to work with scripts like you normally do with perl or shell
scripts. Anybody else on this?
-----Original Message-----
From: Nicolas.Windpassinger@france.sun.com
[mailto:Nicolas.Windpassinger@france.sun.com]On Behalf Of Nicolas
Windpassinger - Sun Microsystems
Sent: Friday, October 20, 2000 7:18 AM
Cc: php-general@lists.php.net
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