Re: [PHP] Intro to PHP question

2007-03-12 Thread Richard Lynch
uot;D"); > if ($d=="Fri") > echo "Have a nice weekend!"; > else > echo "Have a nice day!"; > ?> > ----- Original Message - > From: Dave Goodchild > To: Tijnema ! > Cc: Jonathan Kahan ; php-general@lists.php.net >

Re: [PHP] Intro to PHP question

2007-03-12 Thread Richard Lynch
You sure you don't have something like: . . . Or, perhaps, if you are usin CGI, and you have JUST set it up, and you have the wrong command line flags to execute the input as PHP directly somehow... Does work? On Thu, March 8, 2007 11:43 am, Jonathan Kahan wrote: > Hi all, > > I am using a l

Re: [PHP] Intro to PHP question

2007-03-09 Thread Tijnema !
On 3/8/07, Ben Ramsey <[EMAIL PROTECTED]> wrote: On 3/8/07 1:44 PM, Tijnema ! wrote: > He wanted to use it for the web, so why should he try it out on CL first? Because there are some advantages to being able to run something quickly through the CLI without having to load it in a web browser. H

Re: [PHP] Intro to PHP question

2007-03-08 Thread Jim Lucas
Dave Goodchild wrote: Of course it's possible to output raw html in a php file, that's one of it's fundamental uses! In fact, it's more efficient to switch the php parser off and send raw html as the php parser doesn't need to get involved. Just to point out, the last person did not say to outp

Re: [PHP] Intro to PHP question

2007-03-08 Thread Ashley M. Kirchner
Tijnema ! wrote: I can offer a few MBs for everyone that wants to get learning PHP. Mariachi Bands! Yes, of course they can teach you how to PHP to the music and Tequila!. :) -- W | It's not a bug - it's an undocumented feature. +---

Re: [PHP] Intro to PHP question

2007-03-08 Thread Jake McHenry
riginal Message - From: "Jonathan Kahan" <[EMAIL PROTECTED]> To: Sent: Thursday, March 08, 2007 1:43 PM Subject: Re: [PHP] Intro to PHP question Hi all, I went to a website called php-cli.com and found that i needed to type #!/usr/bin/php -q in the header line. Once I typ

RE: [PHP] Intro to PHP question

2007-03-08 Thread Jim Moseby
> > He wanted to use it for the web, so why should he try it out > on CL first? I agree, though trying something out at the CLI may be his only option if he doesn't have/want a webserver set up. > > I can offer a few MBs for everyone that wants to get learning PHP. > Motherboards? JM -- P

Re: [PHP] Intro to PHP question

2007-03-08 Thread Ben Ramsey
On 3/8/07 1:44 PM, Tijnema ! wrote: He wanted to use it for the web, so why should he try it out on CL first? Because there are some advantages to being able to run something quickly through the CLI without having to load it in a web browser. He was just doing a simple test, so the PHP CLI wa

Re: [PHP] Intro to PHP question

2007-03-08 Thread Tijnema !
He wanted to use it for the web, so why should he try it out on CL first? I can offer a few MBs for everyone that wants to get learning PHP. Tijnema On 3/8/07, Ben Ramsey <[EMAIL PROTECTED]> wrote: On 3/8/07 12:59 PM, Dave Goodchild wrote: > If you really want to run that on the command line

Re: [PHP] Intro to PHP question

2007-03-08 Thread Jonathan Kahan
Goodchild ; php-general@lists.php.net Sent: Thursday, March 08, 2007 12:54 PM Subject: Re: [PHP] Intro to PHP question AFAIK you can't run a php file directly, or you need to add #!/bin/php or something to the first line, but you can run it with php ../uri.php but i suggest you to r

Re: [PHP] Intro to PHP question

2007-03-08 Thread Ben Ramsey
On 3/8/07 12:59 PM, Dave Goodchild wrote: If you really want to run that on the command line, you will need the path to php on the first line of the file. Or, he can run it through the PHP CLI with: $> php uri.php Please, forget the command line stuff unless you want to write command line scr

Re: [PHP] Intro to PHP question

2007-03-08 Thread Dave Goodchild
Why not learn in a web environment if your goal is to build a website? Just create the following file: save it, upload it and view it. If you see the php details you have the system set up as you need it and can just start writing php-driven web pages (the file you are using now is one!). If y

Re: [PHP] Intro to PHP question

2007-03-08 Thread Tijnema !
sage - *From:* Dave Goodchild <[EMAIL PROTECTED]> *To:* Tijnema ! <[EMAIL PROTECTED]> *Cc:* Jonathan Kahan <[EMAIL PROTECTED]> ; php-general@lists.php.net *Sent:* Thursday, March 08, 2007 12:43 PM *Subject:* Re: [PHP] Intro to PHP question If you are running that from the command line, why do you need html? Not sure why you're doing that.

Re: [PHP] Intro to PHP question

2007-03-08 Thread Satyam
sure. Anyway, it is just the guess of a non-expert. Satyam - Original Message - From: "Jonathan Kahan" <[EMAIL PROTECTED]> To: Cc: "Jonathan Kahan" <[EMAIL PROTECTED]> Sent: Thursday, March 08, 2007 5:43 PM Subject: [PHP] Intro to PHP question Hi all,

Re: [PHP] Intro to PHP question

2007-03-08 Thread Jonathan Kahan
jnema ! Cc: Jonathan Kahan ; php-general@lists.php.net Sent: Thursday, March 08, 2007 12:43 PM Subject: Re: [PHP] Intro to PHP question If you are running that from the command line, why do you need html? Not sure why you're doing that.

Re: [PHP] Intro to PHP question

2007-03-08 Thread Dave Goodchild
If you are running that from the command line, why do you need html? Not sure why you're doing that.

Re: [PHP] Intro to PHP question

2007-03-08 Thread Dave Goodchild
Of course it's possible to output raw html in a php file, that's one of it's fundamental uses! In fact, it's more efficient to switch the php parser off and send raw html as the php parser doesn't need to get involved.

Re: [PHP] Intro to PHP question

2007-03-08 Thread Tijnema !
[EMAIL PROTECTED]> *Cc:* php-general@lists.php.net *Sent:* Thursday, March 08, 2007 12:03 PM *Subject:* Re: [PHP] Intro to PHP question Your probably created it from a windows machine. Try converting the file first with dos2unix dos2unix ../uri.php Tijnema On 3/8/07, Jonathan Kahan <[EMA

Re: [PHP] Intro to PHP question

2007-03-08 Thread Jonathan Kahan
@lists.php.net Sent: Thursday, March 08, 2007 12:03 PM Subject: Re: [PHP] Intro to PHP question Your probably created it from a windows machine. Try converting the file first with dos2unix dos2unix ../uri.php Tijnema On 3/8/07, Jonathan Kahan <[EMAIL PROTECTED]> wrote:

Re: [PHP] Intro to PHP question

2007-03-08 Thread Tijnema !
Your probably created it from a windows machine. Try converting the file first with dos2unix dos2unix ../uri.php Tijnema On 3/8/07, Jonathan Kahan <[EMAIL PROTECTED]> wrote: Hi all, I am using a linux server. When the php file below (uri.php) is run from the command line I get the following

[PHP] Intro to PHP question

2007-03-08 Thread Jonathan Kahan
Hi all, I am using a linux server. When the php file below (uri.php) is run from the command line I get the following error. Any ideas on what I could do differently? Thanks for any help, Jonathan ../uri.php: line 1: syntax error near unexpected token `newline' ../uri.php: line 1: `'