faqts : Computers : Programming : Languages : PHP

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

6 of 12 people (50%) answered Yes
Recently 6 of 10 people (60%) answered Yes

Entry

How to make included htm use the correct path for showing images?

Feb 24th, 2008 20:09
dman, Michael Wales, Aigars Rukers, http://www.ttnr.org


Try using require("filename..htm"); instead of include("filename.htm").
Include always sees the included file as the same portion of the 
document, but require sees it as all one document. This causes problems 
when you have syntax errors because it will claim the error occurs in 
the last required file, although it could be in any of the required 
files.