| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| Senior Member Join Date: Nov 2004
Posts: 1,129
![]() ![]() ![]() ![]() | Newbie PHP Question If I just create a .php text file, but don't put in the <? in the beginning, does anything I put in there count as regular html? So basically it's an html file before I put in the <? ? If so, then I can just get a regular html site and just insert some php code where needed? Thanks - I'm learning |
| |
| | #3 (permalink) |
| NamePros Expert Join Date: Nov 2003 Location: Scotland
Posts: 5,074
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | iNod is correct. If you have no need to have it as a .php file however it is best not to as before it outputs to you it has to go through the php parser because it has php as an extension therefore takes up server resources (not noticeable on a small site but a large 1 will soon have excess activity). |
| |
| | #4 (permalink) |
| NamePros Regular Join Date: Jul 2004 Location: Seattle, Wa
Posts: 596
![]() ![]() ![]() | I'll give you a little example. INDEX.PHP ---------- <html> <head> <title>Test</title> </head> <body> <?php echo "Test"; ?> </body> </html> That will work because the file is called index.php. Now, if you didn't feel like putting any php in there, you can still name it index.php, it just has nothing to parse, so it acts the same as .html. (except in filth's situation). |
| |
| | #7 (permalink) |
| NamePros Regular Join Date: Jul 2005 Location: U.S.A.
Posts: 655
![]() ![]() | <? before yes of course like this? PHP Code: ![]() ????: NamePros.com http://www.namepros.com/programming/152585-newbie-php-question.html -coolprogram
Last edited by Coolprogram; 02-12-2006 at 11:12 AM.
|
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Tutorial: Getting started with PHP (The Basics) | deadserious | Webmaster Tutorials | 60 | 11-17-2007 11:35 AM |
| Great Scripts for Sale With Resale Rights! | Zeeble | Scripts For Sale | 20 | 01-04-2006 01:39 AM |
| Googlism - What does google think of you? | deadserious | The Break Room | 55 | 12-15-2005 09:09 AM |