Allegro.cc - Online Community

Allegro.cc Forums » Game Design & Concepts » It's time to learn me stuff

This thread is locked; no one can reply to it. rss feed Print
 1   2   3 
It's time to learn me stuff
23yrold3yrold
Member #1,134
March 2001
avatar

Yeah, but that's annoying. :) Why can't I just double-click my .php file to open it? ;)

Anyway, yeah. My PHP scripts are working now, albeit only from the one directory. Time to formally try MySQL ...

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

ReyBrujo
Moderator
January 2001
avatar

You defined your DocumentRoot variables?

--
RB
光子「あたしただ…奪う側に回ろうと思っただけよ」
Mitsuko's last words, Battle Royale

23yrold3yrold
Member #1,134
March 2001
avatar

My who what?

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

X-G
Member #856
December 2000
avatar

Your Apache configuration (httpd.conf). Look for a line that says "DocumentRoot". Change it. Restart Apache.

--
Since 2008-Jun-18, democracy in Sweden is dead. | 悪霊退散!悪霊退散!怨霊、物の怪、困った時は ドーマン!セーマン!ドーマン!セーマン! 直ぐに呼びましょう陰陽師レッツゴー!

23yrold3yrold
Member #1,134
March 2001
avatar

I only get the one directory? Bah! :)

I'll play with that ...

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

ReyBrujo
Moderator
January 2001
avatar

Yep :) You can declare aliases later, so that accessing http://127.0.0.1/games/index.html access in fact /DOCUMENTROOT/PAGES/GAMES, etc.

--
RB
光子「あたしただ…奪う側に回ろうと思っただけよ」
Mitsuko's last words, Battle Royale

Kanzure
Member #3,669
July 2003
avatar

Quote:

Yeah, but that's annoying. Why can't I just double-click my .php file to open it?

Well, you can associate notepad with it or something to edit it. And, if you want to just click on it, and have it popup the parsed page, you could make it a link to http://localhost/thefile.php...Because php.exe parses the php files when apache says so, and opening the file would have no call to php.exe (and also no way of enviorement variables! :o)

Somebody can probably offer a better explanation ;)

23yrold3yrold
Member #1,134
March 2001
avatar

I know; I figured that much out on my own. :)

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

ReyBrujo
Moderator
January 2001
avatar

Maybe you can setup your text editor to call for php.exe before opening it. Or maybe you can even create a bat file with something like

php.exe %1 > %TEMP%\temp.html
iexplore %TEMP\temp.html

and add it to your Send To menu (code not tested!!!).

--
RB
光子「あたしただ…奪う側に回ろうと思っただけよ」
Mitsuko's last words, Battle Royale

Jakub Wasilewski
Member #3,653
June 2003
avatar

Rey: I believe SciTE does something like that implicitly for PHP files, when you use the "Go" command from the menu. Not sure if 23 is using SciTE, though ;).

---------------------------
[ ChristmasHack! | My games ] :::: One CSS to style them all, One Javascript to script them, / One HTML to bring them all and in the browser bind them / In the Land of Fantasy where Standards mean something.

Thomas Fjellstrom
Member #476
June 2000
avatar

23: apache also lets you create aliases to any file/folder on your computer, or heck, you can redirect a file/folder to an external address. Or you can create Virtual Hosts, and have more than just "localhost" work, you can have "my1337game" and/or "23yrold3yrold.com" point at the same or different document roots. :) Then theres user pages, you remember that ~ (tilde) thing you see alot? You can do that too! once enabled, Apache on XP defaults http://localhost/~USER/ to <b>C:\Documents and Settings\USER\My Documents\My Webpage</b> or something similar. which of course, you can change. :D

Apache is really nice, if a bit bloated.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

23yrold3yrold
Member #1,134
March 2001
avatar

This thread again? :P

Yes, I use SciTE. :)

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

 1   2   3 


Go to: