Be a Supporter!

PHP question

  • 316 Views
  • 6 Replies
New Topic Respond to this Topic
Drake-SI
Drake-SI
  • Member since: Mar. 7, 2005
  • Offline.
Forum Stats
Member
Level 21
Programmer
PHP question 2005-06-23 23:25:07 Reply

Yaa... for some reason all of a sudden my computer doesn't like do the php function "echo" correctly for example it will say
';
when i put the code
<?php
echo 'hello';
?>
,is there any way to fix it?

nixopax
nixopax
  • Member since: Jan. 10, 2005
  • Offline.
Forum Stats
Member
Level 20
Programmer
Response to PHP question 2005-06-23 23:36:51 Reply

Is PHP correctly installed on your computer?

AlternateAccount
AlternateAccount
  • Member since: Jun. 21, 2003
  • Offline.
Forum Stats
Member
Level 14
Blank Slate
Response to PHP question 2005-06-23 23:41:29 Reply

If all else fails, try adding in brackets.
Useless for the most part, but for your puproses try this -
<?php
echo ('hello');
?>

Drake-SI
Drake-SI
  • Member since: Mar. 7, 2005
  • Offline.
Forum Stats
Member
Level 21
Programmer
Response to PHP question 2005-06-23 23:58:31 Reply

Not sure if it is correctly installed if not how could i?

Frylock8586
Frylock8586
  • Member since: May. 22, 2005
  • Offline.
Forum Stats
Member
Level 07
Blank Slate
Response to PHP question 2005-06-24 00:41:17 Reply

Are you running some sort of HTTP server on your computer like Apache? PHP isn't browser-parsed.

nixopax
nixopax
  • Member since: Jan. 10, 2005
  • Offline.
Forum Stats
Member
Level 20
Programmer
Response to PHP question 2005-06-24 10:27:04 Reply

At 6/23/05 11:58 PM, Drake_SI wrote: Not sure if it is correctly installed if not how could i?

Well, you need to download the PHP files from php.net

And then, you need the apache server installed as well. Those are the basics.

But before you download those files, type this:

<?php
phpinfo();
?>

If a page of information shows up on your screen when you run the php file, you'll know that it is correctly installed.

Pilot-Doofy
Pilot-Doofy
  • Member since: Sep. 13, 2003
  • Offline.
Forum Stats
Member
Level 37
Musician
Response to PHP question 2005-06-24 12:28:46 Reply

At 6/24/05 09:18 AM, Kaosboy85 wrote: Ok, this is somethig gsmall that people forget , are you sure the file name is .php instead of .htm?

Of course, otherwise it would just show the code.