|
|
|
||||
|
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() |
|
|||||||
| Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
|
Thread Tools |
|
|
#1 |
|
Moo Moo Cow
Join Date: Mar 2004
Location: Washington State
Posts: 14,748
|
PHP Question
I changed a .shtml page into a .php page so I could include some PHP files, etc.
On the .shtml page I was calling out a cgi script to be run like this: <!--#exec cgi="../cgi-bin/script.cgi" --> But now that the page is a .php it's not running. How to I call this out with php? I tried: <?php include("../cgi-bin/script.cgi"); ?> But that didn't work... Thanks! ![]() |
|
|
|
|
|
#2 |
|
Confirmed User
Join Date: Aug 2003
Location: Someplace Windy
Posts: 4,501
|
exec( "/path/to/cgi/script/script.cgi" );
__________________
Perfect Gonzo |
|
|
|
|
|
#3 |
|
Too lazy to set a custom title
Join Date: Jan 2002
Location: Holland
Posts: 9,870
|
include "file.php";
__________________
Don't let greediness blur your vision | You gotta let some shit slide icq - 441-456-888 |
|
|
|
|
|
#4 | |
|
Confirmed User
Join Date: Apr 2002
Location: /root/
Posts: 4,997
|
Quote:
have you even bothered to read the thread ? |
|
|
|
|
|
|
#5 |
|
Confirmed User
Join Date: May 2004
Posts: 570
|
try
virtual("../cgi-bin/script.cgi"); it work for me
__________________
* lesbian thumb tgp/mgp:looking for trades * submit your lesbian galleries here * simple php programing on the cheap * icq:158726131 |
|
|
|
|
|
#6 |
|
Confirmed User
Industry Role:
Join Date: Aug 2001
Location: Scotland
Posts: 2,238
|
<?virtual("../cgi-bin/script.cgi");?>
that should work for you ...
__________________
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. |
|
|
|
|
|
#7 |
|
Confirmed User
Join Date: Dec 2004
Location: the center
Posts: 1,454
|
you can use the SetHandler directive in htaccess to process the .php file as a .shtml file if you need to
|
|
|
|
|
|
#8 |
|
Confirmed User
Join Date: Jul 2004
Posts: 847
|
ask jimthefiend, he knows everything!
|
|
|
|
|
|
#9 |
|
Confirmed User
Join Date: Aug 2005
Location: O&A PARTY ROCK
Posts: 444
|
Yeah, virtual might work, havent messed with it in a while. You could also try to fopen("http://www.your.com/cgi-bin/file.cgi"), slower but maybe better.
The problem is that PHP has no idea how to parse your CGI code, so you will have to read in the OUTPUT of the script. -G
__________________
The GFY popularity contest scoreboard |
|
|
|
|
|
#10 |
|
Confirmed User
Industry Role:
Join Date: Jul 2003
Posts: 3,108
|
virtual() is your best solution here as long as it is apache.
You can also use passthru() to execute the script, this would not case an apache subrequest to launch, and might be better in some cases.
__________________
"Think about it a little more and you'll agree with me, because you're smart and I'm right." - Charlie Munger |
|
|
|
|
|
#11 | |
|
Confirmed User
Join Date: Feb 2002
Location: Amsterdam
Posts: 9,377
|
Quote:
![]()
__________________
| http://www.sinnerscash.com/ | ICQ: 370820 | Skype: SinnersCash | AdultWhosWho | |
|
|
|
|
|
|
#12 |
|
Moo Moo Cow
Join Date: Mar 2004
Location: Washington State
Posts: 14,748
|
Hey, thanks for all the replies. I just made a seperate .shtml page and put it in an iframe, that worked the best.
Thanks! |
|
|
|