请问用phpExcelReader方式,excel文件名字可以是中文吗?
我的代码是
require_once 'phpExcelReader/Excel/reader.php';$data = new Spreadsheet_Excel_Reader();$data->setOutputEncoding('UTF-8');$data->read('物业.xls'); $db = mysql_connect('localhost', 'root', '123456');@mysql_query("set names 'utf8'"); //输出中文 @mysql_select_db('first'); //选择数据库 echo $data->sheets[0]['cells'][1][1];echo $data->sheets[0]['cells'][3][1];
现在excel的名字是英文的,可以读取excel数据,可“物业.xls”,就会报错:
Fatal error: Uncaught exception 'Exception' with message 'Could not open 物业.xls for reading! File does not exist, or it is not readable.' in D:\PHP\htdocs\phpMyAdmin\libraries\PHPExcel\PHPExcel\Shared\OLERead.php:72 Stack trace: #0 D:\PHP\htdocs\phpExcelReader\Excel\reader.php(389): PHPExcel_Shared_OLERead->read('??????.xls') #1 D:\PHP\htdocs\1.php(5): Spreadsheet_Excel_Reader->read('??????.xls') #2 {main} thrown in D:\PHP\htdocs\phpMyAdmin\libraries\PHPExcel\PHPExcel\Shared\OLERead.php on line 72
网上说修改reader.php文件 我试过了,也没用!请问咋整啊?
回复讨论(解决方案)
简体中文 windows 系统的字符集是 gbk 的
而你的程序使用的是 utf-8 字符集,那么中文文件名(utf-8编码的)如何能找得到呢?
简体中文 windows 系统的字符集是 gbk 的
而你的程序使用的是 utf-8 字符集,那么中文文件名(utf-8编码的)如何能找得到呢?
嗯 谢谢版主 我把php文件保存成ansi格式 就可以了

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Enter my page on the home page, select Edit Information, then select a name, delete it and then enter the name you want to set to save it. Tutorial Applicable Model: iPhone 13 System: IOS 15.3 Version: Douyin 20.6.0 Analysis 1 First open Douyin and click My Options in the lower right corner of the homepage. 2Then click the Edit Information button on the right side of the avatar on my page. 3 Then click the name option on the pop-up page. 4 Click the delete icon at the back, enter the name you want to set, and click Save. Supplement: What is the role of Douyin nicknames? 1 The role of Douyin account nickname settings is that on the one hand it is easy to distinguish, on the other hand it is helpful for users to enter searches, and finally it is conducive to the expansion of fan users' creations. Summary/Notes on Douyin nicknames for one day

As a modern programming language, Go language plays an important role in development. The Go language provides some built-in time functions and structures to make time processing more convenient. In this article, we will introduce some commonly used time processing methods in the Go language. time.Now() We can use the time.Now() function to get the current time: now:=time.Now()fmt.Println(now) output: 2019-06-131

When using a Linux system, network card drift may occur after installing specific network card drivers or related programs. Possible symptoms are: After installing a certain network card driver, the order of the network cards may be reversed. For example, the network port connected by the network cable was eth0 before, but after the driver is installed, it may be changed to eth1 or other names. (2) The name of the network card changes. This situation is not a change from eth0 to eth1, but a very strange change. For example, eth0 cannot be found, and there is an additional network card named __tmp3183921382193__. This situation is really annoying. Because some people may need to use the ifconfig|grepeth command to obtain information for development work, if the network card name

1. A master of counting sheep in bed. 2. Tang Seng is very low-key, wearing a windbreaker and a hat. 3. The spicy president. 4. Your uncle Wang next door. 5. But I’m really pretty. 6. Love solo queue player. 7. The male god of long johns. 8. The user you searched for is already married. 9. Ugly is ugly and has a household registration. 10. The dream of a billion girls. 11. Tomatoes are none of your business. 12. Professionals who stay in bed. 13. Play beans while eating and sleeping. 14. I am short because I am afraid of heights. 15. Big sister in kindergarten. 16. Fly Pikachu. 17. What's so bad about having no breasts? 18. Looking back, the pig is smiling. 19. The chief of the national server

Chrome will automatically record the URLs that have been entered in the address bar, and will automatically "associate query content" in the future. But many times we don't need some URLs, how to delete them? The editor often encounters this problem. Addresses that have been entered before will be blocked in front of commonly used addresses, resulting in the need to select several times to enter the desired website. I have looked for how to delete it at least three times because... I forget it every time. In the address bar shortcuts of Chrome's official help Chrome keyboard shortcuts, the delete shortcut key is clarified: ▍Windows deletes the address bar association content. Press the down arrow key to highlight the corresponding content, and then press the Shift+Delete key ▍macOS deletes the address Bar association content click down

Many users will encounter this situation because they have registered and used Baidu Tieba for a long time, causing them to be dissatisfied with their Baidu Tieba username and want to change it. Next, the editor of this site will share with you the detailed operation method for Baidu Tieba users to change their username. For interested users, please follow the editor to take a look at the detailed introduction of the operation method for Baidu Tieba users to change their user names. First, open the Baidu Tieba application, enter the Tieba main interface, click the "My" button at the bottom right to jump Go to personal page. On the personal page, click your avatar to enter the profile editing interface. On this interface, you can see an option to edit information. Click to start editing personal information. How to unblock a banned Baidu Tieba account? first

The win7 system is Microsoft's traditional operating system and has many practical functions, such as the function of win7 system restore points. By setting a restore point in win7, you can restore the system to the restore point in win7 to achieve the purpose of system repair. How to set restore point in win? The following editor will teach you how to set a restore point in win7. How to set a restore point in win7 1. Find the desktop shortcut, right-click and select Properties. 2. After entering the property settings, select Advanced System Configuration. 3. Select the system maintenance option in the pop-up system properties box. 4. Click to create a restore point now for the controller with system protection turned on. 5. Add a description of the restore point, then click Create, wait patiently for a while, the restore point is successfully established, and then click Close. You can restore the system next time.

The xp system can be said to be a computer system that Microsoft released a long time ago. Currently, very few people are using it. The key is to use it on old computers. Many netizens want to upgrade the xp system to win7, but they don’t know how to upgrade the xp system to win7. .The actual operation steps will be demonstrated below. 1. Download and install the three-step software for beginners and open it. Select the win7 system and click to reinstall immediately. 2. Wait for the tool to automatically download the win7 system. 3. Reinstall the Windows system online immediately after downloading, please follow the prompts. 4. After the installation is completed, you can choose to restart immediately. 5. Enter the run menu bar and select the second item XiaoBaiPE-MSDNOnlineIns
