PHP problem
Moderator: General Moderators
PHP problem
this might be the most rookie Q uve heard but, when i save a *.phtml file, it doesnt appear as a IE# file, and i try t open it with IE and it doesn't work, even though it CAN open phtml files, when they are in web pages. 
- aaronhall
- DevNet Resident
- Posts: 1040
- Joined: Tue Aug 13, 2002 5:10 pm
- Location: Back in Phoenix, missing the microbrews
- Contact:
* Please use descriptive post titles
* Please post PHP-related questions in the PHP forum
* Please do not use AOL-speak
This depends on your Apache configuration, not on your browser. Take a look at http://alfredo.palconit.com/archives/ph ... dconf.html
* Please post PHP-related questions in the PHP forum
* Please do not use AOL-speak
This depends on your Apache configuration, not on your browser. Take a look at http://alfredo.palconit.com/archives/ph ... dconf.html
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Regarding titles, there's this:
As for getting the filename use double quotes around the filename to make it literal to notepad: "foo.php" for example.
Regarding posting location, there's this:[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:2. Use descriptive subjects when you start a new thread. Vague titles such as "Help!", "Why?" are misleading and keep you from receiving an answer to your question.
As for using notepad: download a real code/text editor. There's a long thread in General Discussion regarding editors people have recommended, so this isn't the place to talk of that.[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:1. Select the correct board for your query. Take some time to read the guidelines in the sticky topic.
As for getting the filename use double quotes around the filename to make it literal to notepad: "foo.php" for example.
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Have a read through the Starter Pack.
And please, stop using aolSpeak.
If you're not sure what that means: http://en.wikipedia.org/wiki/AOL_speak
And please, stop using aolSpeak.
If you're not sure what that means: http://en.wikipedia.org/wiki/AOL_speak
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
.phtml files still need to be parsed through the PHP engine. Are you putting the .phtml files in your server path somewhere and calling them like a web page (from http://localhost/mypage.phtml) or are you trying to view them as html files in your browser?
look, 2b honest, my web page hasnt any files (http://www.xtra-e-ncome.com), but what i do is that i make my txt files and save em like you told me("foo.phtml"). Then i try to run them wih IE7 browser, but he cant read em, so. dats my problem. IDK if i have to install those php files (php.net) in my computer or what, i would appreciatte advice.
- jayshields
- DevNet Resident
- Posts: 1912
- Joined: Mon Aug 22, 2005 12:11 pm
- Location: Leeds/Manchester, England
feyd wrote:stop using aolSpeak.
If you're not sure what that means: http://en.wikipedia.org/wiki/AOL_speak
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Everah | Moved to Miscellaneous
Next, you are going to need to set your computer up as a server. The most commonly recommended package for doing this for you is XAMPP which installs the Apache Web Server, the MySQL database server, PHP, Perl and host of other web server apps. Additionally, you can install each component individually if you wanted to. I would suggest installing the Apache web server (version 2.0.X) first, then the MySQL database server (version 5.0.X), then PHP (version 5.1.X). Whenever possible, and if you are on Windows, install them using the installers (.msi files) as the wizards make installation a lot easier than manual configuration. Of course, if you want to teach yourself how to install these apps, a manual install might be a better learning experience than the wizard.
Start with that, and make sure to follow the installation instructions to the letter. Then save your phtml (or .php files) into your web server somewhere and call it in your browser like you would any web site substituting the domain.com bit for localhost.
Post back if you have any questions.
First bit of advice, please stop using AOL speak. There are a lot of people that visit these forums from all over the world. It is hard enough for a native English speaker to understand AOL speak, I can imagine how difficult it could be for someone that doesn't speak English as a primar language. Thanks in advance for following that rule.Racoon200 wrote:look, 2b honest, my web page hasnt any files (http://www.xtra-e-ncome.com), but what i do is that i make my txt files and save em like you told me("foo.phtml"). Then i try to run them wih IE7 browser, but he cant read em, so. dats my problem. IDK if i have to install those php files (php.net) in my computer or what, i would appreciatte advice.
Next, you are going to need to set your computer up as a server. The most commonly recommended package for doing this for you is XAMPP which installs the Apache Web Server, the MySQL database server, PHP, Perl and host of other web server apps. Additionally, you can install each component individually if you wanted to. I would suggest installing the Apache web server (version 2.0.X) first, then the MySQL database server (version 5.0.X), then PHP (version 5.1.X). Whenever possible, and if you are on Windows, install them using the installers (.msi files) as the wizards make installation a lot easier than manual configuration. Of course, if you want to teach yourself how to install these apps, a manual install might be a better learning experience than the wizard.
Start with that, and make sure to follow the installation instructions to the letter. Then save your phtml (or .php files) into your web server somewhere and call it in your browser like you would any web site substituting the domain.com bit for localhost.
Post back if you have any questions.
why the hell did you replied my topic just to say stop using AOL speak if you didnt reaply something useful dude, i think you may need t remember the purposes of replies.jayshields wrote:feyd wrote:stop using aolSpeak.
If you're not sure what that means: http://en.wikipedia.org/wiki/AOL_speak
And in reply to everal, i think you guyz are confusing my question. I just wanted to know what do i need or what is happening that i can't test my php and phpfamily files. Just that, no need to host the files for the moment.
PS: Im not a native speaker, just for information. I WILL stop using aolspeak but as iam latin, spanish native speaker, and i learned to interpret AOL speak, so can they learn. Also, is much easier to use it.
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
PHP files can only be tested by executing them. If you don't have a PHP engine on your machine then you will either need to host the file to test it or look at the code to test it because a browser will not do anything with a .php, .phtml, .php3, .php4, or .php5 file because it doesn't know what to do with it. The previous explanation I offered was to explain how to set up a PHP engine on your computer to test your PHP files.Racoon200 wrote:And in reply to everal, i think you guyz are confusing my question. I just wanted to know what do i need or what is happening that i can't test my php and phpfamily files. Just that, no need to host the files for the moment.
Please keep in mind that PHP is a server side language and that if there is nothing to interpret it, all you will have is a text file with code in it that does nothing.
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA