我上传了文件夹中的所有文件,但是当我尝试打开网站时,它会向我显示文件树,如下图所示。如何设置我的所有文件以正确运行网站。
我的基础是正确的
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main_page);
timerStart = (Button) findViewById(startTimer);
timerOutput = (TextView) findViewById(R.id.time);
runTimer = new CountUpTimer(1000) {
@Override
public void onTick(long elapsedTime) {
Log.i("elapsedtime", "yes");
timerOutput.setText(runTimer.getelapsedTime());
runTimer.stop();
}
};
View.OnClickListener TimerOnclickLisner = new View.OnClickListener() {
// Looks for user to click on the button to start the timer
@Override
public void onClick(View v) {
if (onOffTracker == true) {
runTimer.restart();
}
else {
runTimer.stop();
}
onOffTracker = !onOffTracker;
}
};
timerStart.setOnClickListener(TimerOnclickLisner);
if (savedInstanceState != null) {
InitializeTimer =
onOffTracker = savedInstanceState.getBoolean(STATE_ONOFFTRACKER);
runTimer = new CountUpTimer(1000) {
@Override
public void onTick(long elapsedTime) {
timerOutput.setText(runTimer.getelapsedTime());
runTimer.stop();
}
};
runTimer = savedInstanceState.getParcelable(STATE_COUNTERUP);
runTimer.restart();
}
}
@Override
protected void onSaveInstanceState(Bundle outState) {
outState.putBoolean(STATE_ONOFFTRACKER, onOffTracker);
outState.putParcelable(STATE_COUNTERUP, runTimer);
super.onSaveInstanceState(outState);
}
我的.htaccess文件代码
#[derive(Debug)]
struct SomeStruct {
value: String,
}
impl SomeStruct {
fn new(value: &str) -> SomeStruct {
SomeStruct { value: value.to_string() }
}
fn change_value(&mut self, new_value: &str) {
self.value = new_value.to_string();
}
}
fn main() {
let mut my_vec = vec![
SomeStruct::new("foo"),
SomeStruct::new("bar"),
];
my_vec[0].change_value(my_vec[1].value.as_str());
}
答案 0 :(得分:0)
首先在localhost中压缩文件并将其解压缩到服务器中(如果您使用的是cPanel,请转到filemanager然后转到public_html,将文件解压缩到那里)。然后在config.php中更改基本URL
new { htmlAttributes = new { @class = "form-control", @readonly = "readonly" } })
在phpmyadmin中创建一个包含所有用户权限的新数据库。复制数据库名称,密码,db用户名。 从您的localhost导出数据库并导入到您的cpanel中的phpmyadmin。 从config文件夹中打开文件database.php upadte数据库详细信息
$config['base_url'] = 'http://www.demo.com/';
将.htaccess文件上传到您的根目录