Converting asp to php successfully
Moderator: General Moderators
Converting asp to php successfully
Hi
I have a problem with trying to convert asp to php. Ive been working on it for ages but i have loads of syntax problems and other errors. I dont want to put the code up as its in multiple files and consists of thousands of lines. I am only 14 and hardly know asp. If anyone is willing to help me convert the files can you please reply and i will send you the files.
Thank you.
Hammer
I have a problem with trying to convert asp to php. Ive been working on it for ages but i have loads of syntax problems and other errors. I dont want to put the code up as its in multiple files and consists of thousands of lines. I am only 14 and hardly know asp. If anyone is willing to help me convert the files can you please reply and i will send you the files.
Thank you.
Hammer
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Yay google: http://asp2php.mikekohn.net/download.php
OR
Post some code, and well do this the old fashion way
OR
Post some code, and well do this the old fashion way
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Can you look at this then and tell me whats wrong with it:
Thanx
Code: Select all
<?php
@ $Language=$VBScript ?>
option explicit;
function pgtitle {
return "Contact";
}
function pgheader {
return "Contact";
}
function mainbit {
echo 'Want to speak to Tom, suggest something, offer a service or something like that? Then email <a href="mailto:tom@plantarion.com">tom@plantarion.com</a><br><br>';
echo 'Want to point out a bug or suggest a fix for one? Then email <a href="mailto:bugs@plantarion.com">bugs@plantarion.com</a><br><br>';
echo 'Want to report a cheating or abuseful person? Then email <a href="mailto:abuse@plantarion.com">abuse@plantarion.com</a><br><br>';
echo 'Want to contribute code and stuff to Plantarion? Then email <a href="mailto:contribute@plantarion.com">contribute@plantarion.com</a><br><br>';
}
include "incngplayout.php"; ?>ah... I see. PHP requires parenthesis after the function name:
Code: Select all
// valid
function something() {
// blah...
}
// invalid
function something {
// blah
}Thanx-that and another tweak ogt the page up and working
Now onto another problem i cant seem to spot the error in this
Any help appreciated
Now onto another problem i cant seem to spot the error in this
Code: Select all
<HTML>
<HEAD>
<Title>Auth Error</title>
<style type="text/css">
<!--
.d { font-family: Verdana; font-size: xx-small; }
-->
</style>
</HEAD>
<BODY bgcolor="#006600" text="#ffffff" link="#ffffff" vlink="#ffffff" alink="#ffffff">
<br><p align=center><font class=d>
<?
echo "<b>Authorization Error</b><br><br>";
if (request("r") == "nc") {
echo "You are not authorized to view this page.<br>";
echo "Maybe your browser is soooo old it thinks a cookie is a tasty treat, in which case you should maybe update.<br>Maybe you havent got cookies enabled, in which case you cannot play Plantarion as we use cookies.<br>Maybe you didnt access any pages for a while and your cookie expired, in which case you should <a href=http://www.plantarion.com target=_top>log back in</a>.<br>Maybe your system time is set in the future, in which case you should set it right then try and <a href=http://www.plantarion.com target=_top>log back in</a>, you tart.<br>Maybe you just entered http://www.plantarion.com/autherror.asp?r=nc into your brower, wierdo.";
} else if request("r") = "nu" or request("r") = "wp" then;
echo "Wrong username or password.";
}
?>
</BODY>
</HTML>Code: Select all
} elseif($_REQUESTї'r'] == 'nu' || $_REQUESTї'r'] == 'wp') {
echo "e;Wrong username or password."e;;
}