Go Back   PCMech Forums > Help & Discussion > Web Design / Development

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 06-05-2005, 11:42 AM   #1
Member (9 bit)
 
Join Date: Sep 2004
Posts: 418
PHP on my system

Okay so I'm trying to learn PHP, so I installed PHP on my system. I figured that it would let php files on my harddrive load properly. I made my first php file (embeded php in html) and IE just shows all the text in the file (the code) and Mozilla attempts to display it as HTML. Am I doing something wrong or do I have to upload the files to a server before they can be used properly? Thanks
GraemeM is offline   Reply With Quote
Old 06-05-2005, 09:19 PM   #2
Member (9 bit)
 
Join Date: Sep 2004
Posts: 418
update:

Okay I put Apache on my system and configured PHP, linking it to the folder that I have those files in. Now when I type the domain of my computer that I'm on, the PHP is working, but when I go through my computer to the php file on my harddrive, php doesn't work. Is there a way around this?
GraemeM is offline   Reply With Quote
Old 06-06-2005, 12:01 AM   #3
Member (8 bit)
 
Join Date: Aug 2003
Location: SoCal
Posts: 178
That's the way it is supposed to work. PHP stands for PHP Hypertext Preprocessor. PHP files on their own are just that--a set of PREprocessor instructions, still meaningless--until they have been "parsed" (executed and interpreted into HTML, which is sent to the browser.) The parsing is performed by the server, which is Apache in this case. The way you request Apache to parse the file is by accessing it through the server address, localhost/file.php.

EDIT: So in short, no, there isn't a workaround, at least not that I have heard of. Why would there need to be? It's just as easy to access the file in the web browser window as in the file browser window.

Last edited by jong2k4; 06-06-2005 at 12:07 AM.
jong2k4 is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 07:24 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2