apache

SpringBoot加Poi仿照EasyPoi实现Excel导出

浪子不回头ぞ 提交于 2021-02-10 08:02:30
POI提供API给Java程序对Microsoft Office格式档案读和写的功能,详细功能可以直接查阅API,因为使用EasyPoi过程中总是缺少依赖,没有搞明白到底是什么坑,索性自己写一个简单工具类,来实现无论传入任何对象集合,都能够实现导出Excel的功能,没有看EasyPoi的源码, 只是在功能上模仿一下。 首先导入基本依赖,除了SpringBoot基本依赖依赖,导入Poi的依赖 <!-- https: // mvnrepository.com/artifact/org.apache.poi/poi --> <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi</artifactId> <version> 3.17 </version> </dependency> <!-- https: // mvnrepository.com/artifact/org.apache.poi/poi-ooxml --> <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi-ooxml</artifactId> <version> 3.17 </version> </dependency> 编写自定义注解 @Retention

after XAMPP install on Mac Sierra - it works, but there is no XAMPP folder. Where is everything?

馋奶兔 提交于 2021-02-10 07:46:05
问题 I have installed XAMPP. It works. I'm trying to figure out the following: 1/ it appears there are now TWO apache servers on my mac. XAMPP just installed an additional server. One is already installed on the default Sierra OS. Is that correct? 2/ I can't find where XAMPP is reading files (document root). in the newly created directory: XAMPP.APP, the file structure is not as indicated in the FAQ's. For example, there is no xamppfiles or logs directory in the XAMPP.app directory. Many thanks in

Run PHP pages without an extension

蹲街弑〆低调 提交于 2021-02-10 07:39:28
问题 I want to run my PHP web pages on an apache web server without the .php extension. So I added the following code: RewriteEngine on RewriteBase / Rewritecond %{REQUEST_URI} !(^/?.*\..*$) [NC] RewriteRule (.*)$ $1.php [NC] in the .htaccess file. This solves my problem but another problem arises. I cannot view the content of any directory (i.e. the file contained in the directory). Please provide me an alternate RewriteRule without this problem. 回答1: You need to make sure that the request URI

Wordpress/htaccess - allow access to subdirectory

北慕城南 提交于 2021-02-10 07:34:33
问题 I have a subdirectory ( app ) I want to access that is in the root folder of my wordpress site. I have looked here: https://wordpress.stackexchange.com/questions/20152/cannot-access-non-wordpress-subdirectories-as-wordpress-overrides-them-with-a-40 I have tried the solutions and nothing worked. I also tried adding a separate .htaccess file to the app subdirectory that looks like this: DirectoryIndex index.php index.html index.htm Options +Indexes But it didn't seem to help: The main .htaccess

Connection of MySQL with PHP not working

陌路散爱 提交于 2021-02-10 07:26:08
问题 This is my situation: I'm trying to connect to my MySQL database with a PHP file on my Apache server, now: my PHP can connect to the MySQL database when I run it from the terminal (using "php -f file.php" ) but when I execute it from a web page it just doesn't connect. This is my php file: echo "TRY CONNECTION"; $conn = mysql_connect($servername, $username, $password); echo "EXECUTED CONNECTION"; The Linux shell prints this: TRY CONNECTIONEXECUTED CONNECTION But the web page prints this: :TRY

.Htaccess redirect to 404 page when certain files doesn't exist

夙愿已清 提交于 2021-02-10 07:15:48
问题 I've been working with my own MVC system for a while now and it works great! I use this in my .htaccess RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-l RewriteRule ^(.+)$ index.php?page=$1 [QSA,L] Now, when a page (controller) doesn't exist, I redirect to /error (in the index.php file) . But there are some scenarios when a picture will be deleted in a folder, and still be printed in the html page. This will

.Htaccess redirect to 404 page when certain files doesn't exist

混江龙づ霸主 提交于 2021-02-10 07:15:41
问题 I've been working with my own MVC system for a while now and it works great! I use this in my .htaccess RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-l RewriteRule ^(.+)$ index.php?page=$1 [QSA,L] Now, when a page (controller) doesn't exist, I redirect to /error (in the index.php file) . But there are some scenarios when a picture will be deleted in a folder, and still be printed in the html page. This will

.Htaccess redirect to 404 page when certain files doesn't exist

点点圈 提交于 2021-02-10 07:14:56
问题 I've been working with my own MVC system for a while now and it works great! I use this in my .htaccess RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-l RewriteRule ^(.+)$ index.php?page=$1 [QSA,L] Now, when a page (controller) doesn't exist, I redirect to /error (in the index.php file) . But there are some scenarios when a picture will be deleted in a folder, and still be printed in the html page. This will

.Htaccess redirect to 404 page when certain files doesn't exist

懵懂的女人 提交于 2021-02-10 07:14:27
问题 I've been working with my own MVC system for a while now and it works great! I use this in my .htaccess RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-l RewriteRule ^(.+)$ index.php?page=$1 [QSA,L] Now, when a page (controller) doesn't exist, I redirect to /error (in the index.php file) . But there are some scenarios when a picture will be deleted in a folder, and still be printed in the html page. This will

.Htaccess redirect to 404 page when certain files doesn't exist

大憨熊 提交于 2021-02-10 07:14:24
问题 I've been working with my own MVC system for a while now and it works great! I use this in my .htaccess RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-l RewriteRule ^(.+)$ index.php?page=$1 [QSA,L] Now, when a page (controller) doesn't exist, I redirect to /error (in the index.php file) . But there are some scenarios when a picture will be deleted in a folder, and still be printed in the html page. This will