php连接文件,用于从android eclips访问mysql

问题描述:

我正在尝试使用php webservices从android eclips访问mysql.我安装了wamp服务器.请指导我把php文件放到哪里?是在wamp的www文件夹中,还是必须安装xampp服务器并将此文件放置在hdocs文件夹中?如果我将php文件放在www文件夹中,那么应在java文件中给出什么url?

我提供的网址为"http://localhost/phpfile.php.但是它无法正常工作.它在输出中显示此网址...

我有2个查询...
.我必须在哪里放置php文件?
. php文件的网址是什么?

请引导我..
在此先感谢...

I am trying to access mysql from android eclips using php webservices. I installed wamp server. Please guide me where I put php file? whether in www folder of wamp or I have to install xampp server and place this file in hdocs folder? If I put php file in www folder then what url should be given in java file?

I am giving the url as "http://localhost/phpfile.php. but it is not working properly. It displays this url as it is on output...

I have 2 queries...
. Where I have to put php file?
. And what will be the url of php file?

Kindly guide me..
Thanks in advance...

不清楚您做了什么.您的HTTP服务器是否已启动并已正确配置?是否已安装PHP,并且服务器已正确配置为可以使用它. * .php文件名? PHP.INI?

HTTP提供的PHP文件的位置与HTML和其他文件没有什么不同.所有目录结构都是根据服务器端文件系统空间相对于网站根目录计算的,而相对于URL空间则是相对于域名计算的.假设您网站的根目录是"c:/MyWebSites/MyWebSite",它给出:
Not clear what have you done. Is your HTTP server installed started and was configured properly? Is PHP installed and the server properly configured to use it. *.php file names? PHP.INI?

The location of PHP files served by HTTP is no different from HTML and other files. All the directory structure is computed relative to the Web site root directory in terms of the server-side file system space, and domain name in terms of URL space. Assuming your root directory of the Web site is "c:/MyWebSites/MyWebSite", it gives:
http://localhost/phpfile.php <--> c:/MyWebSites/MyWebSite/phpfile.php
http://localhost/some-sub-directory/phpfile.php <--> c:/MyWebSites/MyWebSite/some-sub-directory/phpfile.php
...
...



—SA



—SA