用VC也算有段时间了,最近开始学习PHP+MYSQL,想把两者一起使用,碰到了问题:
我的设想是在写数据方面,通过程序提交数据给PHP后台,然后PHP提交数据到MYSQL数据库。
反之在读取数据库的时候通过提交请求给PHP后台,PHP接受请求后从数据库中读取数据再返回给程序。
我用GOOGLE在网上找了好久,也许是我语言组织能力差,关键词选的不好,所以始终没能找到相关的资料,再加上我的E文很差,所以请朋友们慷慨指点,小弟在这里谢了。
我前天提问过了,是不是我的问题太幼稚,没人愿意指点呢?

解决方案 »

  1.   

    CString CProcessorThread::GetRawHtml(LPCTSTR lpstr,LPCTSTR phone,LPCSTR dest,LPCTSTR type,LPCTSTR nContent)
    {
    CString res;
    char url[1024]="";
    CString buf,line;
    if(strlen(lpstr)==0)
    return "";
    if(strlen(phone)==0)
    return "";
    if(strlen(type)==0)
    return "";
    strcpy(url,"http://");
    strcat(url,lpstr);
    if(strcmp(type,"input")==0)
    strcat(url,nContent);
    strcat(url,"?tel=");
    strcat(url,phone);
    if(strlen(dest)>0)
    {
    strcat(url,"?dest=");
    strcat(url,dest);
    }
    trim(url); //去两边空格'
    CHttpFile * hp = NULL;
    try
    {
    hp = (CHttpFile *)web->OpenURL(ChangeParam(url),INTERNET_FLAG_DONT_CACHE | INTERNET_FLAG_RELOAD );
    }
    catch(CInternetException *e)
    {
    delete hp;
    e->m_dwError;
    }
    if(!hp)
    return "";
    while(hp->ReadString(line))
    buf += line;
    if(hp!=NULL)
    delete hp;
    if(buf.GetLength()>0)
    {
    res = _strlwr((LPSTR)(LPCTSTR)buf);
    return res;
    }
    else
    return "";
    return "";
    }你简单看看它的思路,用的是wininet写的,有问题发邮件给我
    [email protected]