ID: 13974 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Old Status: Feedback Status: Closed Bug Type: Filesystem function related Operating System: FreeBSD 4.3 PHP Version: 4.0.6 New Comment:
works fine now: [mini:pgl]:~ $ /usr/local/bin/php -v 4.2.0-dev [mini:pgl]:~ $ cat fopen.php #!/usr/local/bin/php -q <? $loc = 'http://www.php.net'; // no trailing slash if ($fp = fopen($loc, "r")) echo "opened file\n"; ?> [mini:pgl]:~ $ ./fopen.php opened file regards, Peter Lowe. Previous Comments: ------------------------------------------------------------------------ [2001-11-08 13:06:35] [EMAIL PROTECTED] This should be fixed, can you try a snapshot from snaps.php.net and report back wheter it works or not? Derick ------------------------------------------------------------------------ [2001-11-07 06:45:17] [EMAIL PROTECTED] if the trailing slash is left off urls when using fopen(), file() etc, php doesn't open the location. eg: [mini:pgl]:~/public_html/test $ cat fopen.php #!/usr/local/bin/php -q <? $loc = 'http://www.php.net/'; if ($fp = fopen($loc, "r")) echo "opened file\n"; ?> [mini:pgl]:~/public_html/test $ ./fopen.php opened file but: [mini:pgl]:~ $ cat fopen.php #!/usr/local/bin/php -q <? $loc = 'http://www.php.net'; // no trailing slash if ($fp = fopen($loc, "r")) echo "opened file\n"; ?> [mini:pgl]:~ $ ./fopen.php <br> <b>Warning</b>: fopen("http://www.php.net","r") - Undefined error: 0 in <b>./fopen.php</b> on line <b>3</b><br> same with file(): [mini:pgl]:~ $ cat file.php #!/usr/local/bin/php -q <? $loc = 'http://www.php.net/'; echo count(file($loc)); ?> [mini:pgl]:~ $ ./file.php 531 take away the trailing slash: [mini:pgl]:~ $ ./file.php <br> <b>Warning</b>: file("http://www.php.net") - Undefined error: 0 in <b>./file.php</b> on line <b>3</b><br> 1 [mini:pgl]:~ $ /usr/local/bin/php -v 4.0.6 regards, Peter Lowe. ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=13974&edit=1 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]