本文目錄一覽:
- 1、我要找一個php 的B2B系統 最好有源碼的,支持地區分站切換功能 像http://www.86pack.com/ 大家們推薦一下
- 2、系統是基於PHP+MySQL的B2B(電子商務)行業門戶解決方案”是什麼意思呢,謝謝
- 3、用php開發 b2b 用什麼架構
- 4、PHP開發的B2B電子商務開源網站系統哪個最好
我要找一個php 的B2B系統 最好有源碼的,支持地區分站切換功能 像http://www.86pack.com/ 大家們推薦一下
我推薦給你,你百度搜「同徽B2B」或「同徽公司」了解下。他們是專業開發B2B的,已承建了商務部的誠商網,農業部的商務平台,寶鋼集團的採購平台以及深圳的中農網等等,若是沒實力,那肯定是做不了這些的。對吧?
系統是基於PHP+MySQL的B2B(電子商務)行業門戶解決方案”是什麼意思呢,謝謝
就是用PHP語言開發的電子商務平台,要了解B2B電子商務平台,可以了解一下,創想B2B網站管理系統
用php開發 b2b 用什麼架構
一個php編寫的客戶端程序和一個用c編寫的伺服器程序通過socket進行通信的實例
在進行編程之前,我們需要打開socket,打開方法見下:
gedit .bashrc
add things as follow
exportPATH=/usr/local/php5/bin:$PATH //我的php安裝在/usr/local/php5路徑下
source .bashrc
然後:
1. cd/root/php-5.2.13/ext/sockets //我的php安裝包放在/root下
2. phpize
3. ./configure
4. make
5. make install
6. cp /usr/local/lib/php.ini/usr/local/php5/lib/php.ini
7. vi /usr/local/php5/lib/php.ini
add things as follow:
extension_dir =”/usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613/”
extension = “sockets.so”
8.apachectl restart
好了,在重啟apache後,我們就可以進行程序的編寫了,這兩個程序也是網上非常常見的程序,在次借用,也非常感謝程序的原創者。
1. 伺服器端程序:server.c
#include sys/types.h
#include sys/socket.h
#include string.h
#include stdio.h
#include netinet/in.h
#include arpa/inet.h
#include stdlib.h
#include unistd.h
#include errno.h
main(){
int sock;
struct sockaddr_in server,client;
int recvd,snd;
int structlength;
char * server_ip = “128.168.10.1”;
int port = 8888;
charrecvbuf[2000],sendbuf[2000];
char str1[]=”I have received:\n”;
memset((char *)server,0,sizeof(server));
server.sin_family = AF_INET;
server.sin_addr.s_addr = inet_addr(server_ip);
server.sin_port = htons(port);
memset((char *)client,0,sizeof(client));
client.sin_family = AF_INET;
client.sin_addr.s_addr = htonl(INADDR_ANY);
client.sin_port = htons(port);
if((sock = socket (AF_INET,SOCK_DGRAM,0)) 0){
printf(“socket create error!\n”);
exit(1);
}
structlength = sizeof(server);
if( bind(sock,(struct sockaddr *)server,structlength) 0){
printf(“socket bind error!\n”);
perror(“bind”);
exit(1);
}
while(1){
structlength =sizeof(client);
printf(“waiting…….\n”);
recvd = recvfrom(sock,recvbuf,sizeof(recvbuf),0,
(struct sockaddr *) client,structlength);
if(recvd 0){
perror(“recvfrom”);
exit(EXIT_FAILURE);
}
else{
printf(“received:%s\n”,recvbuf);
memset(sendbuf,0,strlen(sendbuf));
memcpy(sendbuf,str1,strlen(str1));
snd = sendto(sock,sendbuf,strlen(str1),0,
(struct sockaddr *) client,structlength);
if(snd 0){
perror(“sendto”);
exit(1);
}
printf(“sendok!\n”);
}
}
close(sock);
}
2.客戶端程序
?php
$server_ip=”128.168.10.1″;
$port = 8888;
$sock=@socket_create(AF_INET,SOCK_DGRAM,0);
if(!$sock){
echo “socket create failure”;
}
if($buf==””)
$buf=”hello,how are you!\n”;
if(!@socket_sendto($sock,$buf,strlen($buf),0,”128.168.10.1″,8888)){
echo “send error\n”;
socket_close($sock);
exit();
}
$buf=””;
$msg=””;
if(!@socket_recvfrom($sock,$msg,256,0,$server_ip,$port)){
echo “recvieve error!”;
socket_close($sock);
exit();
}
echo trim($msg).”\n”;
socket_close($sock);
?
我們通過一個頁面來調用client.php程序,可以傳送自己想發送的消息
form action=”client.php”method=”post”
input type=text name=buf
input type=submitvalue=”submit”
/form
PHP開發的B2B電子商務開源網站系統哪個最好
織夢是使用最多的,但功能比較複雜,調用也很多;開發企業型小網站,還是米拓好一點,這兩個都有官網,你可以進去看看
原創文章,作者:小藍,如若轉載,請註明出處:https://www.506064.com/zh-tw/n/151477.html