小编Sar*_*tha的帖子

没有路由匹配位置“/login”反应路由器dom v6

我正在尝试在`react-router-dom v6.0中组织路由。这是我的流程:

根应用程序组件

function AppComponent() {
  return <AppRoute />;
}
Run Code Online (Sandbox Code Playgroud)

AppRoute.js(基本路由)

const AppRoute = () => {
  return (
    <>
      <GuestRoute path="/login" component={Login} />
    </>
  );
};
Run Code Online (Sandbox Code Playgroud)

访客路线

const GuestRoute = ({ component: Component, ...rest }) => {
  return (
    <GuestLayout>
      <Routes>
        <Route {...rest} element={<Component />} />
      </Routes>
    </GuestLayout>
  );
};
Run Code Online (Sandbox Code Playgroud)

宾客布局

const GuestLayout = ({ children, ...rest }) => {
  return (
        <div>
          {children}
        </div>
  );
};
Run Code Online (Sandbox Code Playgroud)

但是,当我转到 时/login,它并没有破坏页面,但仍然显示 的警告No routes matched location "/login"。我在用react-router-dom …

reactjs react-router-dom

29
推荐指数
2
解决办法
13万
查看次数

如何在Datatable中检测完全分页类型中的第一个,上一个,下一个,最后一个按钮

你可以直接去UPDATE 2

我有一个巨大的表,所以获取偏移,限制不会工作,因为它需要很长时间.所以,我正在考虑转向密钥搜索分页方法,因此我的查询将针对每次点击进行不同,如下所述:

/*First*/
select top (1000) id, name from table_name order by id desc;
/*returns data from 56679923-56678924*/

/*Next*/
select top (1000) id,name from table_name where id < @previous_lowest_id order by id desc;
/*returns data from 56678923-56677924*/

/*Previous*/
SELECT * FROM 
     (select top (1000) id,name 
       from table_name 
       where id > @previous_highest_id 
       order by id asc
     ) as myAlias 
ORDER BY id desc;
/*returns data from 56679923-56678924*/

/*Last*/
SELECT * FROM 
    (select top (1000) id,name
      from table_name
      order by id …
Run Code Online (Sandbox Code Playgroud)

javascript jquery pagination datatables

12
推荐指数
1
解决办法
606
查看次数

403 禁止。您没有权限访问此服务器上的 /。本地主机。瓦普2.5

即使 127.0.0.1 无法正常工作,我也面临访问 localhost 的问题;从我自己的电脑上。但是,我对 /phpmyadmin 没有问题。我正在使用 wamp 2.5 Apache/2.4.9 (Win64) PHP/5.5.12 服务器,位于 127.0.0.1 端口 80,用于 win 8.1。

httpd.conf

#
# This is the main Apache HTTP server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
# In particular, see 
# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do.  They're here …
Run Code Online (Sandbox Code Playgroud)

apache wamp

4
推荐指数
1
解决办法
5万
查看次数

虚拟主机在 ubuntu LAMP 堆栈中无法正常工作

我通过以下方式创建了虚拟主机:

  1. 创建 laravel.test.conf 作为
 - cd /etc/apache2/sites-available
 - sudo nano laravel.test.conf
Run Code Online (Sandbox Code Playgroud)
  1. 然后更新laravel.test.conf
<VirtualHost *:80>

    ServerName laravel.test
    ServerAlias www.laravel.test
    ServerAdmin admin@laravel.test

    DocumentRoot /var/www/laravel/public
    <Directory /var/www/laravel/public/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Require all granted
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>
Run Code Online (Sandbox Code Playgroud)
  1. 运行命令:sudo a2ensite laravel.test

  2. 提供的许可:

sudo chown -R www-data: /var/www/laravel
sudo chown -R $USER:$USER /var/www/laravel
sudo chmod -R 755 /var/www
Run Code Online (Sandbox Code Playgroud)
  1. 添加站点名称于etc/hosts
127.0.0.1 laravel.test www.laravel.test
Run Code Online (Sandbox Code Playgroud)
  1. 重新加载阿帕奇sudo systemctl reload apache2

  2. 运行 configtestsudo apachectl configtest并收到Syntax Ok …

php apache lamp virtualhost

3
推荐指数
1
解决办法
2021
查看次数