non ha senso quello che stai facendo

echo("<script type='text/javascript' src='script.php'></script>");

questo è per includere un file js non php