• <small id='QekFT'></small><noframes id='QekFT'>

      1. <tfoot id='QekFT'></tfoot>
          <bdo id='QekFT'></bdo><ul id='QekFT'></ul>
        <i id='QekFT'><tr id='QekFT'><dt id='QekFT'><q id='QekFT'><span id='QekFT'><b id='QekFT'><form id='QekFT'><ins id='QekFT'></ins><ul id='QekFT'></ul><sub id='QekFT'></sub></form><legend id='QekFT'></legend><bdo id='QekFT'><pre id='QekFT'><center id='QekFT'></center></pre></bdo></b><th id='QekFT'></th></span></q></dt></tr></i><div id='QekFT'><tfoot id='QekFT'></tfoot><dl id='QekFT'><fieldset id='QekFT'></fieldset></dl></div>

        <legend id='QekFT'><style id='QekFT'><dir id='QekFT'><q id='QekFT'></q></dir></style></legend>
      2. 删除文件上传时的文件扩展名

        Remove file extension on file upload(删除文件上传时的文件扩展名)

          <small id='fHfDA'></small><noframes id='fHfDA'>

          <legend id='fHfDA'><style id='fHfDA'><dir id='fHfDA'><q id='fHfDA'></q></dir></style></legend>

              <tbody id='fHfDA'></tbody>
            <tfoot id='fHfDA'></tfoot>

          • <i id='fHfDA'><tr id='fHfDA'><dt id='fHfDA'><q id='fHfDA'><span id='fHfDA'><b id='fHfDA'><form id='fHfDA'><ins id='fHfDA'></ins><ul id='fHfDA'></ul><sub id='fHfDA'></sub></form><legend id='fHfDA'></legend><bdo id='fHfDA'><pre id='fHfDA'><center id='fHfDA'></center></pre></bdo></b><th id='fHfDA'></th></span></q></dt></tr></i><div id='fHfDA'><tfoot id='fHfDA'></tfoot><dl id='fHfDA'><fieldset id='fHfDA'></fieldset></dl></div>

              <bdo id='fHfDA'></bdo><ul id='fHfDA'></ul>
                  本文介绍了删除文件上传时的文件扩展名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我现在正在为一个网站编写代码,该网站上传图片,然后显示它们的画廊风格.我希望将图像的文件名作为图像的名称输入到站点的数据库中.但是,仅使用 $_FILES['images']['name']; 给了我文件名,但最后附加了文件扩展名.如何删除文件扩展名以便我可以单独使用文件名?

                  I'm writing the code for a website right now that's uploads images and then displays them gallery style. What I would like to happen is for the file name of the image to be entered into the site's database as the name of the image. However, just using $_FILES['images']['name']; gives me the file name but with the file extension attached at the end. How would I remove the file extension so I can use the file name by itself?

                  推荐答案

                  可以使用pathinfo()函数(文档).

                  $example  = "my_file.jpeg";
                  $filename = pathinfo($example, PATHINFO_FILENAME);
                  echo $filename; // my_file
                  

                  这篇关于删除文件上传时的文件扩展名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)
                  <tfoot id='ApTc9'></tfoot>
                    <tbody id='ApTc9'></tbody>
                  <legend id='ApTc9'><style id='ApTc9'><dir id='ApTc9'><q id='ApTc9'></q></dir></style></legend>
                    <bdo id='ApTc9'></bdo><ul id='ApTc9'></ul>
                    • <small id='ApTc9'></small><noframes id='ApTc9'>

                        1. <i id='ApTc9'><tr id='ApTc9'><dt id='ApTc9'><q id='ApTc9'><span id='ApTc9'><b id='ApTc9'><form id='ApTc9'><ins id='ApTc9'></ins><ul id='ApTc9'></ul><sub id='ApTc9'></sub></form><legend id='ApTc9'></legend><bdo id='ApTc9'><pre id='ApTc9'><center id='ApTc9'></center></pre></bdo></b><th id='ApTc9'></th></span></q></dt></tr></i><div id='ApTc9'><tfoot id='ApTc9'></tfoot><dl id='ApTc9'><fieldset id='ApTc9'></fieldset></dl></div>