问题描述
我有一个带有change-password.PHP?id = 1&key = 37759的网址
我正在尝试从url和usind的if语句中获取值,但遇到了麻烦。
VSC
但是如果我在它们外面回声,它会像这样:
render() {
console.log("sart_azmoon");
return (
<View style={{
backgroundColor: color.khakestarikam,width: '100%',height: '100%',}} >
<View style={{
marginLeft: "4%",marginRight: "4%",marginTop: 5,marginBottom: 30,borderBottomrighTradius: responsiveWidth(3),borderBottomLefTradius: responsiveWidth(3),}}>
<View style={{
backgroundColor: '#757575',borderTopRighTradius: responsiveWidth(3),borderTopLefTradius: responsiveWidth(3)
}}>
<Text style={{
color: "white",fontFamily: font.font_black,fontSize: responsiveFontSize(2.5),textAlign: "center",marginLeft: responsiveHeight(2),justifyContent: 'center'
}}>
</Text>
</View>
<View style={{
backgroundColor: 'white',}}>
<FlatList
// showsHorizontalScrollIndicator={false}
showsverticalScrollIndicator={false}
contentContainerStyle={{
flexGrow: 1,justifyContent: 'center',alignItems: 'center'
}}
style={{
width: '100%',backgroundColor: '#fff',marginTop: 4,// backgroundColor: 'yellow',}}
// horizontal={true}
// keyExtractor={(data) => data.ExamId}
data={this.state.GroupList}
renderItem={({ item,index }) =>
(
<GroupList
item={item}
/>
)
}
/>
<View style={{ height: responsiveHeight(5),}} />
</View>
</View>
<View style={{
flexDirection: "row",marginLeft: "4%",marginTop: 10,marginBottom: 0
}}>
<Text style={{
color: "#ff4646",textAlign: "left",justifyContent: 'center'
}}>
⬤
</Text>
<Text style={{
color: "#757575",fontSize: responsiveFontSize(1.7),marginTop: responsiveHeight(0.5),}}>
</Text>
</View>
<View style={{
flexDirection: "row",marginRight: responsiveHeight(4),marginBottom: 80
}}>
<Text style={{
color: "#ff4646",}}>
</Text>
</View>
</ScrollView>
</View>
);
}
}
export default start_azmoon;
这也行不通:
if (isset($_POST['password'])) {
$id = $_GET['id'];
$key = $_GET['key'];
echo $key; // this is empty
}
这是此页的完整代码 当用户要求重设密码时,将通过用户在其电子邮件中获得的链接设置change-password.PHP?id = 1&key = 37759。然后将使用以下代码将他们带到此页面。
$id = $_GET['id'];
$key = $_GET['key'];
echo $key; // I get the value
if (isset($_POST['password'])) {
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)