cancel
Showing results for 
Search instead for 
Did you mean: 

PHP in js file

abirhasan
Master User

Hi,  
I have been trying to include this: http://www.jokes-cartoons.com/mainrandom/test1.php in a js file with no success  

This is the php code

<?php
  $rn = mt_rand(0,9); //Change these numbers to match the number of files in "rancon"
  $ranfile = "http://www.jokes-cartoons.com/mainrandom/rancon/ranput_$rn.php";
?><?php include("$ranfile"); ?>

Help with code, please?

0 REPLIES 0