Include will evaluate the file as PHP code, that most likely is not what
you want it to do.  Take a look at file_get_contents(), manual page
available at http://www.php.net/manual/en/function.file-get-contents.

Jason

phpSun, 2003-01-12 at 19:36, Stanislav Skrypnik wrote:
> Hi all,
> I have the problem with this peace of code.
> This code has to include file containing some Javascript functions.
> <?
> //my_file.php
> define ("PATH", "http://mysite/";);
> $javascript=PATH."inc/javascript_functions.js";
> include ($javascript);
> ?>
> 
> When I run this I got message:
> 
> "Warning: php_network_getaddresses: getaddrinfo failed: Temporary failure in
> name resolution in /physical/location/inc/my_file.php on line 5
> Warning: Failed opening 'http://mysite/inc/javascript_functions.js' for
> inclusion (include_path='.:/php/includes:/usr/share/php') in
> /physical/location/inc/my_file.php on line 5"
> 
> I was trying to find info about php_network_getaddresses() but no luck.
> Any help would be very appreciated.
> Stas.
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to