Click to See Complete Forum and Search --> : CGI version of php?


angomeka
03-25-2002, 12:38 PM
I am developing a site on pow web and they told me that they are running a cgi version of php. So when i uploaded my stuff to there site it doesnt work. I tried to chmod it to 777 and i did add the #!/usr/local/bin/php and it still doesnt work. I called them and they said that 'We can not write you codes for you.' BAH! anyone know what i did wrong. here is the code below for a templete.
#!/usr/local/bin/php
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<?php

if((!(isset($QUERY_STRING))) || (empty($QUERY_STRING)))
{

$page = "news";

}
else
{

$page = "$QUERY_STRING";

}

if(!(file_exists("$page" . ".txt")))
{

$content = "These products are arid-free and of museum quality, manufactured with long term storage in mind.";

}
else
{

$content = template("$page.txt");
$content = stripslashes("$content");

}

$newline = template("template.php");
eval("echo stripslashes(\"$newline\");");
exit();
//Lets Start The Functions
function template ($file) {
return addslashes(implode("",file("$file")));
}
?>