• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

inner php in a html file.

 
Ranch Hand
Posts: 802
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ok i have apache, which supports php.

when i do the following in a .html file, the script doesnt execute for some reason.



why won't it echo hello in the browser?

I have another .php file that i call in a form, and that works fine.

Thanks,


Justin Fox
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you set up the .htaccess file so it knows what to do?

If you have no clue, this is how you do it:
http://www.desilva.biz/php/phpinhtml.html

Eric
 
Justin Fox
Ranch Hand
Posts: 802
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
cool man thanks, ill definately do that at work tommorow.

but now i have a different problem, I use Ubuntu at home.

I installed apache2 and php5, but when i go to my

/var/www directory, it tells me i dont have permission to change the
index.html file.

I tried some chmod stuff, but i dont think im doing it right.

If anyone can help, that would be great.

Thanks A Lot,


Justin Fox
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The permissions probably need to be set to root. [It probably will effect all of the include files too]

If you are on a private system you can try to do chown 777 and see if that clears things up.

Eric
 
Justin Fox
Ranch Hand
Posts: 802
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hey, is that .htaccess thing for linux or windows? because i dont see any .htaccess file, and when i create one in the htdocs folder the inner html parsing still doesnt work.

Justin Fox
 
Justin Fox
Ranch Hand
Posts: 802
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
and by the way, i have php triad
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This convo should be in a different forum...let's see...how about...the Apache forum.
[ October 25, 2007: Message edited by: Gregg Bolinger ]
 
Justin Fox
Ranch Hand
Posts: 802
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I never figured out how to get apache to parse my php in the .htm or .html files, so ive been saving all my fils .php and that works just fine.


Thanks anyways,

Justin Fox
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic