Current location: Hot Scripts Forums » Programming Languages » PHP » Need help in adding php to index.htm PLEAZE :)


Need help in adding php to index.htm PLEAZE :)

Reply
  #1 (permalink)  
Old 03-23-04, 05:15 AM
Nadder Nadder is offline
Newbie Coder
 
Join Date: Mar 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Need help in adding php to index.htm PLEAZE :)

Hi guys
i need to add two php scripts on html file if anyone can help me do it for me will be aprecaited .
i have load.php script wich will tell me the load of the server and i have uptime.php wich will tell me the uptime of the server .. i want thies scripts on same page with another bgcolor .. i try to add them but i couldn't make them work togother .
if you have add them to same page and i add them to my server i will be happy for it .

anyone can help me here the files :

http://paltalk4arab.net/files.rar

... Thanx alot


Nadder

Last edited by Nadder; 03-23-04 at 05:17 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 03-23-04, 06:24 PM
mdhall's Avatar
mdhall mdhall is offline
Aspiring Coder
 
Join Date: Oct 2003
Posts: 510
Thanks: 1
Thanked 1 Time in 1 Post
You can't have php scripts run in a .html page. You should change your .html page to index.php, then use the scripts as includes. See if it works.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 03-23-04, 07:47 PM
jewellgr jewellgr is offline
Wannabe Coder
 
Join Date: Aug 2003
Location: Michigan USA
Posts: 111
Thanks: 0
Thanked 0 Times in 0 Posts
The only way you could access those php pages through index.html would be through iframes.
__________________
ArecaWeb Team
Gregg Kenneth Jewell
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 03-23-04, 08:09 PM
blaw's Avatar
blaw blaw is offline
Junior Code Guru
 
Join Date: Dec 2003
Location: Vancouver, BC, Canada
Posts: 550
Thanks: 0
Thanked 0 Times in 0 Posts
Hello,

It's actually possible. Try adding an extension-to-process-with-PHP (i.e. ".html") in your httpd.conf (assuming that you have Apache):

Code:
AddType application/x-httpd-php .php .php3 .html
This should let you process HTML files (or any file with .html extension) process with PHP before sending it to the browser.

If you don't have access to httpd.conf, then I thought (i.e. I'm not sure) you could do it via htaccess, too.

My 22 cents.
__________________
Blavv =|
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #5 (permalink)  
Old 03-23-04, 08:21 PM
Infinite_Hackers's Avatar
Infinite_Hackers Infinite_Hackers is offline
Coding Addict
 
Join Date: Dec 2003
Posts: 307
Thanks: 0
Thanked 0 Times in 0 Posts
don't want to break up the topics point.. but i got
AddType application/x-httpd-php-source .phps

to view the php source...but it asks me to download the file when i try :S why? never used to happne untill i upgraded php (latest stable version)
__________________
New beta project: GFX-PRO.ATH.CX
Description: GFX-PRO a great new project that anyone can and setup in less then a minute. [ More info ]
Website: http://gfx-pro.ath.cx
Status: Online
http://gfx-pro.ath.cx/sig.png
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #6 (permalink)  
Old 03-23-04, 08:44 PM
blaw's Avatar
blaw blaw is offline
Junior Code Guru
 
Join Date: Dec 2003
Location: Vancouver, BC, Canada
Posts: 550
Thanks: 0
Thanked 0 Times in 0 Posts
Hi,

I found this at http://www.zend.com/manual/install.apache.php . This might be of your interest...

Quote:
Originally Posted by ZEND
There are two ways you can use the source code highlighting feature, however their ability to work depends on your installation. If you have configured Apache to use PHP as an SAPI module, then by adding the following line to your httpd.conf (at the same place you inserted AddType application/x-httpd-php .php, see above) you can use this feature: AddType application/x-httpd-php-source .phps.

If you chose to configure Apache to use PHP as a CGI binary, you will need to use the show_source() function. To do this simply create a PHP script file and add this code: <?php show_source ("original_php_script.php"); ?>. Substitute original_php_script.php with the name of the file you wish to show the source of.
__________________
Blavv =|
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #7 (permalink)  
Old 03-23-04, 08:53 PM
Infinite_Hackers's Avatar
Infinite_Hackers Infinite_Hackers is offline
Coding Addict
 
Join Date: Dec 2003
Posts: 307
Thanks: 0
Thanked 0 Times in 0 Posts
oh that's horriable... i installed mine as CGI binary... but why is it only happning now? before it used to work.. very sad.

welll..
Code:
######### ENABLE PHP #############
ScriptAlias /php/ "C:/php/"
Action application/x-httpd-php /php/php.exe
AddType application/x-httpd-php .php .html
AddType application/x-httpd-php-source .phps
##################################
is how i installed it
__________________
New beta project: GFX-PRO.ATH.CX
Description: GFX-PRO a great new project that anyone can and setup in less then a minute. [ More info ]
Website: http://gfx-pro.ath.cx
Status: Online
http://gfx-pro.ath.cx/sig.png

Last edited by Infinite_Hackers; 03-23-04 at 09:01 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #8 (permalink)  
Old 03-24-04, 05:05 AM
Nadder Nadder is offline
Newbie Coder
 
Join Date: Mar 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
God Help Me
my English is bad and thies guys take me to deep language . i ask someone to make the file to me and send it to nadder@q8uae.com if its possible with nice background / big font / in middle show the resault .

if there is no one can do it .... its ok

Thanx
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #9 (permalink)  
Old 03-24-04, 05:21 AM
Sargant Sargant is offline
Newbie Coder
 
Join Date: Mar 2004
Location: Wales
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Nadder
Hi guys
i need to add two php scripts on html file if anyone can help me do it for me will be aprecaited .
i have load.php script wich will tell me the load of the server and i have uptime.php wich will tell me the uptime of the server .. i want thies scripts on same page with another bgcolor .. i try to add them but i couldn't make them work togother .
if you have add them to same page and i add them to my server i will be happy for it .

anyone can help me here the files :

http://paltalk4arab.net/files.rar

... Thanx alot


Nadder
You could try two things:

- Try renaming it to index.php, and see if the server uses it as an index page
- Alternatively, rename it index.shtml and include the two files where needed as:
Code:
<!--#include virtual="../path/to/load.php" -->
<!--#include virtual="../path/to/uptime.php" -->
Both these require server functions up and above simple HTML though.
__________________
My Website: Sargant.Com
Noisebox, a simple but powerful shoutbox script
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #10 (permalink)  
Old 03-24-04, 10:40 AM
Nadder Nadder is offline
Newbie Coder
 
Join Date: Mar 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Thanx all guys

dear Sargant

i try my best but its not working
here its

http://www.q8sites.net/server
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP and MySQL ? rob2132 Hot Scripts Forum Questions, Suggestions and Feedback 4 08-29-08 03:22 AM
PHP Dudes - Hi All stuart New Members & Introductions 4 05-03-04 02:22 PM
Problem with adding content to mysql from php HasansWeb PHP 3 01-10-04 06:26 PM
100 Web Templates & 10 PHP Scripts for sale! HostersUK.co.uk General Advertisements 0 01-10-04 01:31 AM
Realtime PHP Code Obfuscation barrywien General Advertisements 1 11-16-03 07:50 PM


All times are GMT -5. The time now is 09:01 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.