来自UIKit
,我只是在尝试SwiftUI
。
我只是想在带有导航栏的视图中显示世界。所以我写了下面的代码。
我可以看到Text
小部件,但看不到NavigationView
小部件。
var body: some View {
NavigationView {
VStack(alignment: .center) {
Text("Hello World")
}
}
.navigationBarTitle(Text("ForgotPassword")
.font(.largeTitle)
.fontWeight(.medium), displayMode: .inline)
.shadow(color: Color.blue, radius: 0, x: 0, y: 5)
.navigationViewStyle(DefaultNavigationViewStyle())
.background(Color.red)
}
我在这里做错什么了吗?
答案 0 :(得分:2)
尝试一下:
$ftp_server = "myserver";
$ftp_user_name = "myuser";
$ftp_user_pass = "mypass";
$source_file = $_FILES['file']['tmp_name'];
$fileType = $_FILES['file']['type'];
/*get file extension [*/
$fileExt = pathinfo($_FILES["file"]["name"], PATHINFO_EXTENSION);
$fileExt = strtolower($fileExt);
/* ] */
$destination_folder = "/public_html/wp/wp-content/plugins/AbonneerProgrammas/FilesUpload";
$destination_file = $destination_folder . "/" . basename($_FILES['file']['name']);
$conn_id = ftp_connect($ftp_server);
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
ftp_pasv($conn_id, true);
$allowed = array('zip', 'rar');
/*use $extension variable to check allowed or not [*/
if(in_array($fileExt, $allowed)) {
//my upload code
}else {
echo "U mag dit type bestand niet uploaden.";
}
/* ] */