Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Integrating CGI with PHP...

Status
Not open for further replies.

JohnnyT

Programmer
Jul 18, 2001
167
GB
I have recently discovered the benefits of programming PHP scripts on my website to allow me to incorporate an SQL database. I have been used to programming Perl. My question is this - Is there a way of incorporating the two into one script?
How would you do this? Can you run .php pages in the cgi-bin and then require cgi scripts within them?
Sorry if this is a bit of a numpty question but answers will be appreciated.

Thanks What is life, but an excuse for death. And death, an escape from life.
 
If you are trying to include a CGI scripts output in your PHP scripts, you could use the virtual function. For example virtual("/cgi-bin/script.pl"); would include the output of script.pl.

NOTE: This only works on Apache servers. //Daniel
 
Daniel

Thanks for that mate. I've tried it and it works! Nice one.

John I don't make mistakes, I'm merely beta-testing life.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top