php - I try to open a url from a txt file but javascript wont open it -
i use script
<?php $file = fopen("url.txt", "r"); $urls = array(); while (!feof($file)) { $urls[] = fgets($file); } fclose($file); $url = $urls[1]; ?> <html> <head> <script type="text/javascript"> var mywindow; var url = '<? echo $url?>;' function openwin() { mywindow = window.open(url,"_blank","width=100,height=411"); } </script> </head> <body align="right" onload="openwin()"> <br> <br> <br> </body>
atm in url.txt have 2 urls google.com , yahoo.com
but when got page wont open url if put var url = 'google.nl' doest work guys have idea on how fix this
greetings
john
Comments
Post a Comment