File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

inner php in a html file.

 
Justin Fox
Ranch Hand
Posts: 802
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
and by the way, i have php triad
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic