Asked by duncanb7
at 2024-08-03 13:49:14
Point:500 Replies:7 POST_ID:828524USER_ID:11059
Topic:
PHP Scripting Language;Apache Web Server;Windows XP Operating System
I just start to use XAMPP server for Apache and PHP on WIndow XP, and simple php program is
working fine. But When I try to connect remote website such as www.yahoo.com to
collect the data. it complaint the curl function of curl_init is not defined such as $curl = curl_init();
in the following php code
Fatal error: Call to undefined function curl_init() in C:xampphtdocsxamppcurl.php on line..
SO I am wondering, whether we could NOT use curl function of php on WIndow XP but it only works
on Linux server. Is it Right, any alternavtive besides using file_get_contents() ?
And the final question:
I would like to seperate the function code into other file and include in the main program
I tried to add this include "c:/mydir/php/include/my_curl.php but php always complaint can NOT
find the file of my_curl, so finally I put the my_curl function into my main program OR
include "my_curl" and save my_curl.php ,this works if save my_curl.php into c:xampphtdocsxampp
since I get a lot php file from c:mydir/php/include , so I could not copy all to
C;xampphtdocsxammp, any suggestion so xammp/apache server can locate anywhere the php file is saved or located
Please advise for those two questions
Duncan
working fine. But When I try to connect remote website such as www.yahoo.com to
collect the data. it complaint the curl function of curl_init is not defined such as $curl = curl_init();
in the following php code
Fatal error: Call to undefined function curl_init() in C:xampphtdocsxamppcurl.php on line..
SO I am wondering, whether we could NOT use curl function of php on WIndow XP but it only works
on Linux server. Is it Right, any alternavtive besides using file_get_contents() ?
And the final question:
I would like to seperate the function code into other file and include in the main program
I tried to add this include "c:/mydir/php/include/my_curl.php but php always complaint can NOT
find the file of my_curl, so finally I put the my_curl function into my main program OR
include "my_curl" and save my_curl.php ,this works if save my_curl.php into c:xampphtdocsxampp
since I get a lot php file from c:mydir/php/include , so I could not copy all to
C;xampphtdocsxammp, any suggestion so xammp/apache server can locate anywhere the php file is saved or located
Please advise for those two questions
Duncan