刚开始学小程序没多久,这么一个简单的过程整了一个礼拜,关键是没人指导啊啊啊啊啊……心累,翻阅了n个书籍,查看了m个网站,亲测可以正常连接。现在终于明白了学习效率:培训班>看视频>自学。好啦,不多说了,进入正题!
1、数据库插入数据。 Mysql 数据库我没有放在本地,是放在远程服务器的,其实最终就是IP地址的问题。首先数据库里插入四条语句,如下图所示,
2、 tomcat 部署php。过程步骤如下,
1) 首先下载php程序,是一个zip的压缩包。如下图所示,
2) 将下载的php压缩包解压到tomcat的安装路径下,并重命名为php,如下图所示,
3) 查看电脑中是否已安装php的方法:计算机-属性-高级设置中点击“环境变量”,添加PATH环境变量,可以添加Admin环境变量,也可以添加系统环境变量,看个人需求,将php解压路径添加到PATH中。之后打开cmd,输入php -v或 php –version,如下图所示,
4)将php路径下的php. ini -development 复制,将副本改名php.ini,之后用记事本打开php.ini。(可以看出;为其注释符)修改其中两项设置:
①去掉 ext ension_dir = “ext”前面的 “ ; ”, 并且将extension_dir = “ext”修改为绝对路径,
②cgi.force_redirect修改为0,并去掉前面的 “ ; ”, 即 cgi.force_redirect = 0
如下图,
5)打开tomcat的conf文件夹。
选择context.xml文件,在<Context >加上属性privileged=”true”,如下图所示,
6)仍在tomcat的conf文件夹中。
修改web.xml文件,在<web-app>中加入如下的< servlet >
插入代码如下:
<servlet>
<servlet-name>php</servlet-name>
<servlet-class>org.apache.catalina.servlets.CGIServlet</servlet-class>
<init-param>
<param-name>clientInputTimeout</param-name>
<param-value>200</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>0</param-value>
</init-param>
<init-param>
<param-name>executable</param-name>
<param-value>D:tomcatphpphp-cgi.exe</param-value>
</init-param>
<init-param>
<param-name>passShellEnvironment</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>cgiPathPrefix</param-name>
<param-value>WEB-INF/phpbin</param-value>
</init-param>
<load-on-startup>5</load-on-startup>
</servlet>
7) 在<web-app>中加入如下的<servlet-mapping>,表示php 脚本 路径。
代码如下:
<servlet-mapping>
<servlet-name>php</servlet-name>
<url-pattern>/phpbin/*</url-pattern>
</servlet-mapping>
8) 新建一个api.php文件,文件内容如下。
在webappsROOTWEB-INF下新建一个phpbin的文件夹,并将api.php放置其中,如下图,
$sql=”select * from persons”;
$res=$link->query($sql);
$data=$res->fetch_all();
echo json_encode($data);
?>
api.php脚本代码如下(新建txt文件,修改后缀名为php即可):
<?php
$link = new mysqli(‘10.103.20.54′,’root’,’abcdefg’,’test’);
$link->set_charset(“utf8”);
if($link->connect_error){
die(“连接失败:”.$link->connect_error);
}
9)打开tomcat(在bin文件夹下,双击startup.bat,苹果系统双击startup.sh文件即可打开tomcat服务)。
打开浏览器,输入localhost:8080/phpbin/index.php,看到如下页面,表明配置php配置成功!
3、 微信小程序 端。
1)新建一个项目,在index.wxml里输入:
<view wx:for=”{{data}}”>
{{item}}
</view>
2)index.js里输入:
onLoad: function () {
let that = this;
wx. request ({
url: ‘#39; ,
method: ‘GET’ ,
header: {
‘Content-Type’ : ‘application/json’ ,
},
data: {
},
success: function (res) {
console.log(res)
that.setData({
data:res.data,
})
},
fail: function () {
console.log( “请求数据失败” );
},
complete: function () {
}
})
}
3)预览一下,成功!
Rugiet boasts an impressive absorption rate, and the lozenges even taste good, but BlueChew s chewables are stable at room temperature and can travel more easily, earning them practicality points However, Tadalafil doesn t trigger an erection on its own and sexual stimulation is still required
This generic has the same therapeutic and bioequivalent to a brand one
State the purpose of this phenomenon is attributed ta persistent processus vaginalis, which is now well established Table 1 Gonadotoxic Drugs Group Definite gonadotoxicity Alkylating agents Cyclophosphamide 5 Chlorambucil Mustine Melphalan Busulfan 9 Carmustine 10 Lomustine 10 Antimetabolites Cytarabine Vinca alkaloids Vinblastine 11 Others Procarbazine Cisplatin 12 Chapter 20 The Effects of testosterone deficiency generic american cheap levitra in sickle cell anemia
Food and Drug Administration FDA in 1998
1 x 10 6 mL, respectively before treatment with CC. Swierkowski-Blanchard N, Boitrelle F, Alter L, et al.
Rachel uses her own experiences with infertility to write compassionate, practical, and supportive articles.
go to Immortal Venerable Vast Vast Tianji faction no longer has its former glory, and will never return to its former peak, we still have to serve our sect.
Boiron Research Foundation, 141 p75
I don t believe that it is mandatory on the basis of these data to use castration in combination with tamoxifen, but it is my opinion that the data provide sound evidence for this combined treatment as a reasonable choice for these women, Dr Michael Rutlin, PhD Conceptualization Equal; Data curation Equal; Formal analysis Lead; Investigation Lead; Writing original draft Lead; Writing review editing Equal
96 Ојg mg than in normal breast tissues 117
Then I found this site
The final sample size was 360 plus 10 extra cases in the control group
He was treated effectively with high doses of LH RH 200 micrograms day for 3 days, and normal function progressively returned
We came near it and we found that it was a beast called Al Anbar Moreover, the production and secretion of a STAT3 activator, leukemia suppressive factor, was activated in RES treated cells
If you have any problems with balance, feel unsteady, or have feelings of dizziness, you should not exercise with low platelet counts Characterization of the UFH 001 cells is described in two recent publications 71, 72
My onco wants me to switch to an aromatase inhibitor for another 2 plus years
Similar to TAM, the E2 treatment had no significant effect on the mean ER О±46 expression Ој AUC_neg 4
534 35 mg x 4 comps
Some key lifestyle changes that may be effective in curbing the onset of hot flashes
The Dutch Pharmacogenetics Working Group Guideline edited the same recommendation for codeine, tramadol and oxycodone 28
7 How to give a clean sample Don t give urine from your first urination of the day
Tocilizumab, a humanized monoclonal antibody to the interleukin 6 receptor, has been used in patients with acute kidney injury resulting from cytokine release syndrome after chimeric antigen receptor T cell therapy Koester SK, Maenpaa JU, Wiebe VJ, Baker WJ, Wurz GT, Seymour RC, Koehler RE, DeGregorio MW
He repeats the message so that the hard of hearing listener can lip read and speak his answer directly into the telephone
To be on the safe side, avoid taking cranberry extract products or drinking a lot of cranberry juice if you have a history of kidney stones This means that a cracked or broken tooth can t knit itself together, and enamel lost to decay won t grow back
This action results in increased pH value of stomach contents, thus providing relief of hyperacidity symptoms
Transient Acantholytic Dermatosis are generally observed in middle aged and older men onset age is between 40 and 50 years The condition is rare in children and younger individuals Both males and females are affected, although more men are affected than women men women ratio is around 2 1 Worldwide, there is no racial or ethnic preference observed
The following topics represent the main methods used in the production of different types of nanomaterials explored in medicine
In terms of pharmacologic options, bupropion has been tested in a very small open label trial of sexual function in breast cancer patients Example 21 Adverse Events AEs
Rabinerson D, Avrech O, Kaplan B, Braslavsky D, Goldman GA, Neri A 1996 Endometrioma of the vagina in menopause
Besides that individual circumstance, I feel that HCG does more harm then good
Schizophrenia Research
How to tell this drug is working For high blood pressure Your blood pressure should go down
Blood work done, found I have hyperthyroidism and took medicine now badly convert as hypothyroidism so far off the medicine till 1 month 2
Timothy L Lash reports receiving personal fees from Amgen, outside the submitted work
Tell your doctor right away if you have any serious side effects, including signs of kidney problems such as change in the amount of urine, symptoms of heart failure such as swelling ankles feet, unusual tiredness, unusual sudden weight gain
Its the muscle inbetween your anus and scrotum sack and it tenses and contracts during orgasm or proir
It raised Total T quite nicely up to 750- 900 range
Anker SD, Doehner W, Rauchhaus M, Sharma R, Francis D, Knosalla C, et al 2003 Uric acid and survival in chronic heart failure Validation and application in metabolic, functional, and hemodynamic staging