PHP wrapped in CGI
Posted: Thu Feb 10, 2005 4:24 pm
My school's web server is not setup to handle PHP pages. I was told that I need to wrap them in a CGI script. I have never used CGI so I am not sure what I am doing wrong. I followed all of there instructions as far as I can tell and I still have a script error. Below is the code that I am trying to use:
#!/usr/local/bin/php
Content-Type: text/http
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<?php
print "test";
?>
</html>
If you have any idea what I am doing wrong, I would greatly appreciate the help.
Thanks,
-Cam
#!/usr/local/bin/php
Content-Type: text/http
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<?php
print "test";
?>
</html>
If you have any idea what I am doing wrong, I would greatly appreciate the help.
Thanks,
-Cam