NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
[resolved] debugging php in .html files?


Joined: 19 Jun 2006
Posts: 24
Location: florida
Reply with quote
yes i am trying to run the step debugger with php blocks that are embedded in .html files, but phped seems to not allow me to set breakpoints and such with php in .html files.

is there some setting and / or trick that will let me debug this, or do i have to change the whole site over to .php filenames?

thxs,
- mark
View user's profileFind all posts by menriquezSend private messageVisit poster's websiteYahoo Messenger
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
It's a common mistake. If your .html files contain php, they are not html at all, but php. Please adjust File Associations: remove *.html from the list for HTML and add it to the appropriate line (either PHP4 or PHP5 depending on the php version you work with)

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Veteran

Joined: 06 Jun 2007
Posts: 289
Location: Vancouver, Canada
Reply with quote
When a file has an extension .html, the server will typically not parse the PHP code. In other words, everything is seen as HMTL.

Doing the reverse is fine though. You can have a .php file that contains HTML. It may even contain HTML only with no PHP at all.

_________________
Smile
View user's profileFind all posts by annoSend private messageVisit poster's website
Guru master

Joined: 05 Jul 2004
Posts: 659
Location: Belgium
Reply with quote
It is a piece of cake to define .html as a filetype to be parsed with php. In fact you can pretty much make up any extension you want, just updating the webserver config is enough.
So it is possible that html files contain php code. (In fact I have done so myself several times already to hide that php is being used Smile )
View user's profileFind all posts by BlizzSend private messageVisit poster's website
Veteran

Joined: 06 Jun 2007
Posts: 289
Location: Vancouver, Canada
Reply with quote
Blizz wrote:
It is a piece of cake to define .html as a filetype to be parsed with php. In fact you can pretty much make up any extension you want, just updating the webserver config is enough.
Indeed, but it could be "expensive" to run all HTML files (including static content) through the PHP parser. Because parsing HTML files as PHP is not the default behaviour, I used the word "typically" in my response Wink

_________________
Smile
View user's profileFind all posts by annoSend private messageVisit poster's website


Joined: 19 Jun 2006
Posts: 24
Location: florida
Reply with quote
thxs guys, worked like a charm.

phped is the best.

- mark
View user's profileFind all posts by menriquezSend private messageVisit poster's websiteYahoo Messenger
[resolved] debugging php in .html files?
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic