PHP file() error, invalid argument -
i have should straightforward operation, gives me error doesn't seem helpful. code this:
<?php $strlines = file('//tardis/htdocs/apps/freespace/freespace-servers.txt'); . . . ?>
but in php-errors.log, this:
[28-aug-2013 16:31:30] php warning: file(//tardis/htdocs/apps/freespace/freespace-servers.txt) [function.file]: failed open stream: invalid argument in c:\program files (x86)\apache software foundation\apache2.2\htdocs\apps\freespace\freespace.php on line 2
the txt file there. ideas else "invalid argument" might suggest? documentation doesn't seem hint @ of else. or, should doing different way? goal read file in array of things. appreciated.
if you're using unc, address should
file('\\\\tardis\\htdocs\\apps\\freespace\\freespace-servers.txt');
you may need check php configuration allows open remote files.
Comments
Post a Comment