Omnimaga

General Discussion => Technology and Development => Web Programming and Design => Topic started by: tenniskid493 on January 20, 2006, 08:08:00 am

Title: PHP...Where to start?
Post by: tenniskid493 on January 20, 2006, 08:08:00 am
I figured out that the best and most efficent way to store all the info and stats for the forum RPG will be by using PHP.  What do I need to do to be able to host a .php file on my Invision board.  Right now, it doesn't work.  It just gives me a blank screen.
Title: PHP...Where to start?
Post by: tifreak on January 20, 2006, 08:10:00 am
Umm, can I see the source of the file? It might be an error. Also, try putting the file in your folder on my server, see if it works there. :)smile.gif
Title: PHP...Where to start?
Post by: tenniskid493 on January 20, 2006, 08:12:00 am
it was an extremly simple code just to see if it worked

c1-->
CODE
ec1





c2
ec2

it's actually an html file w/ php script
Title: PHP...Where to start?
Post by: tifreak on January 20, 2006, 08:53:00 am
This is mine:

c1-->
CODE
ec1

Testing php



echo "

Hello world!

";
?>
c2
ec2

Don't know if this helps any, I am still learning as well...

You can look at the source files in the php folder on my server...
Title: PHP...Where to start?
Post by: Tyler on January 20, 2006, 12:33:00 pm
Here is mine :Pblah.gif

c1-->
CODE
ec1

parse_str($_SERVER["QUERY_STRING"], $string); // use $string, could be a security breach otherwise
error_reporting(E_ALL); // All Errors

$page_buffer = NULL;
$page_buffer .="

Hello!

";

if ($string["say_something"] == 1)
 
Title: PHP...Where to start?
Post by: tenniskid493 on January 20, 2006, 12:54:00 pm
hmm...none of those seem to work.  I'll try to do it in pure php and not just scripting inside of html
Title: PHP...Where to start?
Post by: rivereye on January 21, 2006, 08:52:00 am
make sure your extensions are .php and not .html (sounds stupid, but I have seen it before)
Title: PHP...Where to start?
Post by: tenniskid493 on January 21, 2006, 12:54:00 pm
If I have them as .php it views it as a home publishing file.  Is there a way I can get around this???
Title: PHP...Where to start?
Post by: rivereye on January 22, 2006, 08:35:00 am
yeah, change how it is registered in windows. You have to have appache installed and go to http://localhost to actually view the site though
Title: PHP...Where to start?
Post by: tenniskid493 on January 22, 2006, 11:03:00 am
You have to have appache installed to see php???
Title: PHP...Where to start?
Post by: tifreak on January 22, 2006, 11:40:00 am
I believe so.

Also, make sure you are saving it as a text document...

Did you try loading it to my site to see if it works?
Title: PHP...Where to start?
Post by: rivereye on January 22, 2006, 12:48:00 pm
tenniskid, you only need it if you want to view on you computer, not files on a server
Title: PHP...Where to start?
Post by: tifreak on January 22, 2006, 12:59:00 pm
Well, the machine would still need apache to run...  
Title: PHP...Where to start?
Post by: rivereye on January 22, 2006, 01:30:00 pm
granted, yes. Look at source forge, there are enough there to fit you
Title: PHP...Where to start?
Post by: tenniskid493 on January 22, 2006, 02:06:00 pm
@tifreak...I couldnt find the folder you made for me..where is it??

So if I wanted to upload a php file to a web host and then have people be able to see it, I would have to have apache on my computer??? Or would my host have to have apache??
Title: PHP...Where to start?
Post by: tifreak on January 22, 2006, 02:54:00 pm
Oops...

public_html>tk493

You can rename it if you want, but I thought you might get tired of typing it out all the time. :)smile.gif
Title: PHP...Where to start?
Post by: tenniskid493 on January 23, 2006, 06:38:00 am
Thats what that folder was.  Thanx.  I'll try it right now.

EDIT:  Sweet..it works.  Thanx
Title: PHP...Where to start?
Post by: tifreak on January 23, 2006, 07:21:00 am
No prob. Feel free to use it as you wish, I have 1 gb of bandwidth to use... :)smile.gif
Title: PHP...Where to start?
Post by: tenniskid493 on January 23, 2006, 10:00:00 am
Sounds good.  Now to incorporate the SQL.  This could be a challenge.