Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: How to include php-code in header

by nefigah (Monk)
on Apr 01, 2008 at 01:16 UTC ( #677677=note: print w/ replies, xml ) Need Help??


in reply to How to include php-code in header

All the include() function does in PHP is essentially put the contents of whatever referenced file into the current file. Since "styles1.inc" doesn't even have a php extension, I imagine you could do this in Perl (maybe by just opening the file and printing its contents).

Also, note that your stylesheet links are never going to print, since you wrapped them in if (false) :)

Update: I imagine they must be wrapped like that so that they will get printed if the code is executed by something not-PHP; it has the look of "yet another crazy html hack" about it.


I'm a peripheral visionary... I can see into the future, but just way off to the side.


Comment on Re: How to include php-code in header
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://677677]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (9)
As of 2014-10-25 15:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (145 votes), past polls