Help - Search - Members - Calendar
Full Version: Hello World Fail... No Php
Zymic Webmaster Forums > Web Design & Development > Server Side Scripting > PHP
keiran420
Just created my account, and started to code... but...

<?php
echo "hello world";
?>

doesn't work ^^

just displays the code, i cant see any settings for this anywhere.... do i need to activate php?
swordz
What did you call the file? It needs to have a .php extension. There is no activation, it always works.

swordz
keiran420
QUOTE(swordz @ Nov 11 2008, 07:28 PM) *
What did you call the file? It needs to have a .php extension. There is no activation, it always works.

swordz



Index.php


should i just add php tags into the html file?


http://kj420.vndv.com/hello.php
Ed
You'll need to write it in a text editor then upload it via ftp, the document you've written with the control panel's editor has replaced the characters for HTML entities. You can also try switching to 'source' mode in the editor.
keiran420
QUOTE(Bread @ Nov 11 2008, 07:46 PM) *
You'll need to write it in a text editor then upload it via ftp, the document you've written with the control panel's editor has replaced the characters for HTML entities. You can also try switching to 'source' mode in the editor.


I dont like this, i can get it working, but when i load it up to edit, its totaly changed....

this makes tweaking hard.

also im getting "Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /www/vndv.com/k/j/4/kj420/htdocs/index.php on line 20" errors...
Andrew
Don't use the control panels editor. Use a program like notepad++ or similar. (Syntax highlighting ftw!!)
Bogey
The control panel has to be messing up very much if it's trying to get something from a MySQL database to print "Hello World: biggrin.gif

Oh well, I'm using Notepad++ and have no problems. I don't use this host (Well, I started for one thing and found it to be inconvenient and bought a hosting for a domain instead).


I just like the forum here smile.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.