在 PHP 中检索 的最快方法 </h1> <div class="d-flex justify-content-between"> <div> <span class="date text-grey ml-2"> 2024-04-29 </span> </div> <div> </div> </div> </div> </div> <hr /> <div class="message text-break"> <div> <div> <p>我正在做一个书签系统,并寻找最快(最简单)的方法来使用 PHP 检索页面标题。</p> <p>如果有类似的东西就好了<code>$title = page_title($url)</code></p> </div> </div> <br><div> <div> <pre><code><?php function page_title($url) { $fp = file_get_contents($url); if (!$fp) return null; $res = preg_match("/<title>(.*)<\/title>/siU", $fp, $title_matches); if (!$res) return null; // Clean up title: remove EOL's and excessive whitespace. $title = preg_replace('/\s+/', ' ', $title_matches[1]); $title = trim($title); return $title; } ?> </code></pre> <p>尝试一下以下输入:</p> <pre><code>print page_title("http://www.google.com/"); </code></pre> <p>输出:谷歌</p> <p>希望足够通用,适合您的使用。如果您需要更强大的东西,花一点时间研究 HTML 解析器可能不会有什么坏处。</p> <p>编辑:添加了一些错误检查。第一个版本有点仓促,抱歉。</p> </div> </div> <span style="display:none;" allenmark_388="399332"></span> </div> <div class="mt-3 text-grey"> 本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@) <span id='ref_question'> </span> </div> <hr> <div class="row"> <div class="col-lg-12 text-muted mt-2"> <i class="icon-tags mr-2"></i> <span class="badge border border-secondary mr-2"> <h2 class="h6 mb-0 small"> <a class="text-secondary" href="/topic/624"> php </a> </h2> </span> <span class="badge border border-secondary mr-2"> <h2 class="h6 mb-0 small"> <a class="text-secondary" href="/topic/969"> html </a> </h2> </span> <span class="badge border border-secondary mr-2"> <h2 class="h6 mb-0 small"> <a class="text-secondary" href="/topic/3996"> Parsing </a> </h2> </span> </div> </div> </div> </div> <div class="d-none threadlist"> <input type="checkbox" name="modtid" value="942199" checked /> </div> <!--<a role="button" class="btn btn-secondary btn-block xn-back col-lg-6 mx-auto mb-3" href="javascript:history.back();">返回</a>--> </div> <div class="card border-0 shadow-sm mb-3 col-lg-3"> <div class="card-header bg-white"> <h3 class="h6 font-weight-400 my-0"> 在 PHP 中检索 <title> 的最快方法 的相关文章 </h3> </div> <ul class="list-group list-group-flush"> <li class="list-group-item bg-white"> <h4 class="h6 my-0"> <a href="/article/969569" class="d-block text-truncate"> 通过 PHP 检测 excel .xlsx 文件 mimetype </a> </h4> <div class="col-lg-12 text-break text-muted brief mt-2"> 我无法通过 PHP 检测 xlsx Excel 文件的 mimetype 因为它是 zip 存档 文件实用程序 file file xlsx file xlsx Zip archive data at least v2 0 to extra </div> </li> <li class="list-group-item bg-white"> <h4 class="h6 my-0"> <a href="/article/969581" class="d-block text-truncate"> 监听服务响应 JavaScript </a> </h4> <div class="col-lg-12 text-break text-muted brief mt-2"> 背景 我正在为网页制作 Chrome 扩展程序 在此网页中 我需要捕获用户发出 POST 请求时服务器发送的响应 目前 我们使用观察者模式来检查 HTML 页面上的更改 但这很笨拙并且会触发多次 客观的 我需要捕获该响应 相应地解析其信息 </div> </li> <li class="list-group-item bg-white"> <h4 class="h6 my-0"> <a href="/article/969591" class="d-block text-truncate"> Symfony 3新建项目报错 </a> </h4> <div class="col-lg-12 text-break text-muted brief mt-2"> 我开始编写有关 Symfony 3 的教程 在使用以下命令创建新项目时遇到问题 php symfony phar new Symfony 我有这个错误 GuzzleHttp Exception RequestException Error </div> </li> <li class="list-group-item bg-white"> <h4 class="h6 my-0"> <a href="/article/969605" class="d-block text-truncate"> 如果执行了锚点 href 链接,则禁用 onClick 事件 </a> </h4> <div class="col-lg-12 text-break text-muted brief mt-2"> 我有一张桌子 每一行都是一个由 js 调用的某个页面 例如 google com 的链接 onClick window open 方法 tr class tr 在最后一栏中我有一个锚点链接链接到其他页面 例如 jsfiddle td cla </div> </li> <li class="list-group-item bg-white"> <h4 class="h6 my-0"> <a href="/article/969633" class="d-block text-truncate"> 为什么将 MySQL 凭据放在 www 目录之外? [复制] </a> </h4> <div class="col-lg-12 text-break text-muted brief mt-2"> 这个问题在这里已经有答案了 可能的重复 将核心类放在 Web 根目录之上 好还是坏主意 https stackoverflow com questions 3648739 putting core classes above the web </div> </li> <li class="list-group-item bg-white"> <h4 class="h6 my-0"> <a href="/article/969759" class="d-block text-truncate"> Guzzle 中的“并发”到底是什么? </a> </h4> <div class="col-lg-12 text-break text-muted brief mt-2"> 我没有找到太多关于concurrency选项中Pool 如果这是可以在服务器上打开的 TCP 套接字数量 那么问题是 我可以使用多少并发来更快地处理请求 我有这个使用的例子Pool I am using Laravel this is ba </div> </li> <li class="list-group-item bg-white"> <h4 class="h6 my-0"> <a href="/article/969808" class="d-block text-truncate"> 不使用 PHP 提交联系表单 </a> </h4> <div class="col-lg-12 text-break text-muted brief mt-2"> 我还是一名学生 今天我们的讲师告诉我们 无需使用 mailto 函数即可提交联系我们表单的唯一方法是使用 PHP 我发誓去年另一位讲师向我们展示了一种仅使用 javascript 的方法 是否可以使用基本表单和 javascript 提交反 </div> </li> <li class="list-group-item bg-white"> <h4 class="h6 my-0"> <a href="/article/969893" class="d-block text-truncate"> IE10中的图像插值 </a> </h4> <div class="col-lg-12 text-break text-muted brief mt-2"> 这是我的用例 我有一个采用响应式设计的网页 该页面垂直分成两半 我想在右侧显示图像 呈现为 PNG 或 JPG 的 PDF 页面 调整窗口大小后 图像的大小应立即更改 我以为我已经解决了这个问题 我将服务器上的图像渲染得足够大 以适应最大可 </div> </li> <li class="list-group-item bg-white"> <h4 class="h6 my-0"> <a href="/article/970033" class="d-block text-truncate"> 如何从 Javascript/Typescript 中的数组对象计算运行总计并使用 HTML 在每个实例上显示输出? </a> </h4> <div class="col-lg-12 text-break text-muted brief mt-2"> 我正在开发一个 MEAN 堆栈项目 并且有一个如下所示的数组 savings any 300 450 350 500 我还有一个名为 saving bf 的变量 它是从数据库中检索的结转储蓄 其值如下 savings bf 15000 我想 </div> </li> <li class="list-group-item bg-white"> <h4 class="h6 my-0"> <a href="/article/970146" class="d-block text-truncate"> 给定两个日期,在 PHP 中查找工作日数的最佳方法是什么? </a> </h4> <div class="col-lg-12 text-break text-muted brief mt-2"> 标题几乎是不言自明的 给定两个日期 使用 PHP 查找工作日数的最佳方法是什么 工作日为周一至周五 例如 我如何知道中间有 10 个工作日31 08 2008 and 13 09 2008 datefrom strtotime datefr </div> </li> <li class="list-group-item bg-white"> <h4 class="h6 my-0"> <a href="/article/970174" class="d-block text-truncate"> Swift - 将图像插入 PDF 不再适用于 iOS 13 </a> </h4> <div class="col-lg-12 text-break text-muted brief mt-2"> 目前正在开发在我的贷款计算器应用程序上导出 PDF 的功能 我有一个预览屏幕 可以在您保存 PDF 之前显示它 预览屏幕由带有 html 的 webView 组成 其中包含占位符 我能够成功地将图像插入到正确的占位符上 并将其显示在 PDF </div> </li> <li class="list-group-item bg-white"> <h4 class="h6 my-0"> <a href="/article/970203" class="d-block text-truncate"> proc_open() 失败并显示“权限被拒绝” </a> </h4> <div class="col-lg-12 text-break text-muted brief mt-2"> 我正在尝试使用proc open 执行程序并打印结果 但是 我不断收到 许可被拒绝 的消息 已将脚本和可执行文件的 chmod 设置为 0777 但无济于事 ini get safe mode 是假的 可能出什么问题了 我正在使用 Cent </div> </li> <li class="list-group-item bg-white"> <h4 class="h6 my-0"> <a href="/article/970217" class="d-block text-truncate"> foreach 循环中 current() 的意外行为[重复] </a> </h4> <div class="col-lg-12 text-break text-muted brief mt-2"> 这个问题在这里已经有答案了 这是一个简单的循环 list array A B C D foreach list as var print current list Output demo http 3v4l org sBDjl BBBB O </div> </li> <li class="list-group-item bg-white"> <h4 class="h6 my-0"> <a href="/article/970313" class="d-block text-truncate"> Intro.js 2页然后返回首页 </a> </h4> <div class="col-lg-12 text-break text-muted brief mt-2"> 我在用intro js http introjs com 为我的网站创建一个小介绍 我希望游览从第 1 页 主页 2 另一页 然后回到第 1 页 主页 我已经成功地从第 1 2 页开始 但不确定如何让它返回到第 1 页 我对 javascr </div> </li> <li class="list-group-item bg-white"> <h4 class="h6 my-0"> <a href="/article/970332" class="d-block text-truncate"> 无需 cron 在后台发送邮件 </a> </h4> <div class="col-lg-12 text-break text-muted brief mt-2"> 我想知道是否有一种方法可以运行 PHP 循环 以便在后台向订阅者发送几百封电子邮件 我的目标是格式化新闻通讯 单击发送 然后关闭浏览器或更改页面 当然 发送电子邮件的实际过程将在后台运行 不会因浏览器关闭而中断 我知道这可以通过 cron </div> </li> <li class="list-group-item bg-white"> <h4 class="h6 my-0"> <a href="/article/970411" class="d-block text-truncate"> Gmail 和 Google Chrome 12+ 中的“从剪贴板粘贴图像”功能如何工作? </a> </h4> <div class="col-lg-12 text-break text-muted brief mt-2"> 我注意到一个来自 Google 的博文 http gmailblog blogspot com 2011 06 pasting images into messages just got html其中提到 如果您使用的是最新版本的 Chro </div> </li> <li class="list-group-item bg-white"> <h4 class="h6 my-0"> <a href="/article/970453" class="d-block text-truncate"> Onblur 事件在另一个 div 的 onclick 之前触发 </a> </h4> <div class="col-lg-12 text-break text-muted brief mt-2"> 如上所述 我有一个按钮 单击该按钮将打开子菜单 对于子菜单中的每个选项 都有三个元素 我认为实际上还有更多元素 但为了简单起见 将其保留为 3 我将焦点放在子菜单的主 div 白色 框架 上 Onblur 这个 div 然后我隐藏子菜单 这 </div> </li> <li class="list-group-item bg-white"> <h4 class="h6 my-0"> <a href="/article/970553" class="d-block text-truncate"> 如何使用 php 从字符串中提取日期 </a> </h4> <div class="col-lg-12 text-break text-muted brief mt-2"> 我需要从字符串中提取日期 下面是我的代码和字符串 str Updated status to Masters Software Engineering Enrolled Documents to Send on 03 06 2014 14 </div> </li> <li class="list-group-item bg-white"> <h4 class="h6 my-0"> <a href="/article/970597" class="d-block text-truncate"> 响应式2列2行布局 </a> </h4> <div class="col-lg-12 text-break text-muted brief mt-2"> 我一直在试图弄清楚如何创建这个布局 我有一个 2 列布局 左列有 1 行 右侧有 2 行 我试图让它流畅地调整 我遇到的问题是 我希望右侧顶部图像的顶部与左侧图像的顶部对齐 而底部图像的底部与左侧图像的底部保持对齐 我应该使用桌子吗 这是我 </div> </li> <li class="list-group-item bg-white"> <h4 class="h6 my-0"> <a href="/article/970714" class="d-block text-truncate"> 优化 CSS 交付 - Google 的建议 </a> </h4> <div class="col-lg-12 text-break text-muted brief mt-2"> 谷歌建议在 head 中使用非常重要的 CSS 内联 并在内部使用其他 CSS </div> </li> </ul> </div> <div class="col-lg-12"> <div class="card-header bg-white"> <h3 class="h6 font-weight-bold my-0"> 随机推荐 </h3> </div> <ul class="list-group list-group-flush"> <li class="list-group-item bg-white"> <h4 class="h6 my-0"> <a href="/article/942180" class="d-block text-truncate" title='不区分大小写“包含(字符串)”' aria-label='不区分大小写“包含(字符串)”'> 不区分大小写“包含(字符串)” </a> </h4> <div class="col-lg-12 text-break text-muted brief mt-2"> 有没有办法让下面的返回为真 string title ASTRINGTOTEST title Contains string 似乎没有过载允许我设置区分大小写 目前我将它们都大写 但这很愚蠢 我指的是i18n http en wikiped </div> </li> <li class="list-group-item bg-white"> <h4 class="h6 my-0"> <a href="/article/942181" class="d-block text-truncate" title='为什么这个 eclipse 错误显示以及它的解决方案应该是什么' aria-label='为什么这个 eclipse 错误显示以及它的解决方案应该是什么'> 为什么这个 eclipse 错误显示以及它的解决方案应该是什么 </a> </h4> <div class="col-lg-12 text-break text-muted brief mt-2"> 缺少库 xdoclet 1 2 1 jar 选择 XDoclet 的主目录 1 2 1 为什么这个 eclipse 错误显示以及它的解决方案应该是什么alz 这可能是因为该 jar 没有添加到您的项目构建路径中 请按照以下步骤操作 Righ </div> </li> <li class="list-group-item bg-white"> <h4 class="h6 my-0"> <a href="/article/942182" class="d-block text-truncate" title='如何处理MaxUploadSizeExceededException' aria-label='如何处理MaxUploadSizeExceededException'> 如何处理MaxUploadSizeExceededException </a> </h4> <div class="col-lg-12 text-break text-muted brief mt-2"> MaxUploadSizeExceededException当我上传的文件大小超过允许的最大值时 会出现异常 我想在出现此异常时显示错误消息 如验证错误消息 我该如何处理这个异常 以便在 Spring 3 中执行类似的操作 Thanks 这 </div> </li> <li class="list-group-item bg-white"> <h4 class="h6 my-0"> <a href="/article/942183" class="d-block text-truncate" title='可变长度数组性能影响 (C/C++)' aria-label='可变长度数组性能影响 (C/C++)'> 可变长度数组性能影响 (C/C++) </a> </h4> <div class="col-lg-12 text-break text-muted brief mt-2"> 我正在编写一个相当简单的函数 它将数组发送到文件描述符 但是 为了发送数据 我需要附加一个一字节标头 这是我正在做的事情的简化版本 它似乎有效 void SendData uint8 t buffer size t length uint8 </div> </li> <li class="list-group-item bg-white"> <h4 class="h6 my-0"> <a href="/article/942184" class="d-block text-truncate" title='使用Javascript自动将光标移动到下一个表单字段[关闭]' aria-label='使用Javascript自动将光标移动到下一个表单字段[关闭]'> 使用Javascript自动将光标移动到下一个表单字段[关闭] </a> </h4> <div class="col-lg-12 text-break text-muted brief mt-2"> 很难说出这里问的是什么 这个问题是含糊的 模糊的 不完整的 过于宽泛的或修辞性的 无法以目前的形式得到合理的回答 如需帮助澄清此问题以便重新打开 访问帮助中心 help reopen questions 是否可以使用Javascipt自动将 </div> </li> <li class="list-group-item bg-white"> <h4 class="h6 my-0"> <a href="/article/942185" class="d-block text-truncate" title='自动滚动的实时行情(如 Twitter 的“热门推文”)' aria-label='自动滚动的实时行情(如 Twitter 的“热门推文”)'> 自动滚动的实时行情(如 Twitter 的“热门推文”) </a> </h4> <div class="col-lg-12 text-break text-muted brief mt-2"> 是否有一个好的 Javascript 库可以生成自动滚动列表 例如 Twitter 主页上的 热门推文 最好作为 jQuery 插件 它还应该支持 AJAX 功能 动态添加新列表项 由于我们对现有的解决方案并不满意 因此我们从头开始实施了一 </div> </li> <li class="list-group-item bg-white"> <h4 class="h6 my-0"> <a href="/article/942186" class="d-block text-truncate" title='移动数组中的元素' aria-label='移动数组中的元素'> 移动数组中的元素 </a> </h4> <div class="col-lg-12 text-break text-muted brief mt-2"> 我需要一点帮助 我想将数组中的元素向上移动一个元素 以便新位置 1 包含位置 1 中的旧值 new 2 包含 old 1 依此类推 旧的最后一个值被丢弃 第一个位置的新值是我每秒给出的新值 我使用大小为 10 的数组 uint32 t TE </div> </li> <li class="list-group-item bg-white"> <h4 class="h6 my-0"> <a href="/article/942187" class="d-block text-truncate" title='如何在 VMWare 中查看 Django 开发服务器?' aria-label='如何在 VMWare 中查看 Django 开发服务器?'> 如何在 VMWare 中查看 Django 开发服务器? </a> </h4> <div class="col-lg-12 text-break text-muted brief mt-2"> 我正在尝试从运行 Windows 的 VMWare 连接到在 OS X localhost 8000 中运行的 Django 开发服务器 我尝试了各种设置组合 但似乎都不起作用 在 localhost 8000 上运行 Django 服务器 </div> </li> <li class="list-group-item bg-white"> <h4 class="h6 my-0"> <a href="/article/942188" class="d-block text-truncate" title='ServiceM8 - 我可以过滤多个字段吗' aria-label='ServiceM8 - 我可以过滤多个字段吗'> ServiceM8 - 我可以过滤多个字段吗 </a> </h4> <div class="col-lg-12 text-break text-muted brief mt-2"> 我正在研究与 ServiceM8 的集成 并希望使用 filter REST API 来过滤多个 类似 company uuid 和 status 之类的东西 ServiceM8 文档给出了以下示例 但不包括 OR AND 类型逻辑的任何使 </div> </li> <li class="list-group-item bg-white"> <h4 class="h6 my-0"> <a href="/article/942189" class="d-block text-truncate" title='在 where 子句中使用 CASE 时出现语法错误' aria-label='在 where 子句中使用 CASE 时出现语法错误'> 在 where 子句中使用 CASE 时出现语法错误 </a> </h4> <div class="col-lg-12 text-break text-muted brief mt-2"> 类似的问题已被问到here https stackoverflow com questions 22001787 using if condition in where clause 无论如何 我遇到了语法错误 我无法弄清楚 这是我的代码 </div> </li> <li class="list-group-item bg-white"> <h4 class="h6 my-0"> <a href="/article/942190" class="d-block text-truncate" title='包含不同类型的两个集合相交' aria-label='包含不同类型的两个集合相交'> 包含不同类型的两个集合相交 </a> </h4> <div class="col-lg-12 text-break text-muted brief mt-2"> 假设我有一个集合 称之为ids它是类型IEnumerable </div> </li> <li class="list-group-item bg-white"> <h4 class="h6 my-0"> <a href="/article/942191" class="d-block text-truncate" title='如何在 Java 中以编程方式获取接口的所有实现的列表?' aria-label='如何在 Java 中以编程方式获取接口的所有实现的列表?'> 如何在 Java 中以编程方式获取接口的所有实现的列表? </a> </h4> <div class="col-lg-12 text-break text-muted brief mt-2"> 我可以通过反思或类似的方式来做到这一点吗 我已经搜索了一段时间 似乎有不同的方法 这里总结一下 反思 https github com ronmamo reflections如果您不介意添加依赖项 该库非常受欢迎 它看起来像这样 Refle </div> </li> <li class="list-group-item bg-white"> <h4 class="h6 my-0"> <a href="/article/942192" class="d-block text-truncate" title='如何在亚马逊云(AWS EC2)中安装firefox?' aria-label='如何在亚马逊云(AWS EC2)中安装firefox?'> 如何在亚马逊云(AWS EC2)中安装firefox? </a> </h4> <div class="col-lg-12 text-break text-muted brief mt-2"> 我有一个拥有所有权限的 AWS 账户 我想在环境中安装 Firefox 因为我的应用程序将启动 Firefox 并对 Web 应用程序运行一些测试 如何安装火狐浏览器 执行以下命令解决了问题 sudo apt get install xvf </div> </li> <li class="list-group-item bg-white"> <h4 class="h6 my-0"> <a href="/article/942193" class="d-block text-truncate" title='从多个通知启动活动会覆盖之前的意图' aria-label='从多个通知启动活动会覆盖之前的意图'> 从多个通知启动活动会覆盖之前的意图 </a> </h4> <div class="col-lg-12 text-break text-muted brief mt-2"> public static void showNotification Context ctx int value1 String title String message int value2 NotificationManager no </div> </li> <li class="list-group-item bg-white"> <h4 class="h6 my-0"> <a href="/article/942194" class="d-block text-truncate" title='带有多表查询的 SQL Join 版本的 Djangoviews.py' aria-label='带有多表查询的 SQL Join 版本的 Djangoviews.py'> 带有多表查询的 SQL Join 版本的 Djangoviews.py </a> </h4> <div class="col-lg-12 text-break text-muted brief mt-2"> 需要一些有关 Django 版本的 SQL 多表查询的帮助 该查询使用 3 个表来检索餐厅名称 地址Restaurants table和美食类型来自Cuisinetypes table 所有这些都基于通过 URL 传递的菜品名称 菜品 ID </div> </li> <li class="list-group-item bg-white"> <h4 class="h6 my-0"> <a href="/article/942195" class="d-block text-truncate" title='如何使用 cypress.io 处理 PayPal 弹出窗口上的元素' aria-label='如何使用 cypress.io 处理 PayPal 弹出窗口上的元素'> 如何使用 cypress.io 处理 PayPal 弹出窗口上的元素 </a> </h4> <div class="col-lg-12 text-break text-muted brief mt-2"> 我需要自动化端到端测试 包括使用 PayPal 购买订单 此测试包括验证购买订单后出现的屏幕中的某些元素 我目前正在尝试使用 cypress io 我知道赛普拉斯建议不要访问第三方网站 https docs cypress io guide </div> </li> <li class="list-group-item bg-white"> <h4 class="h6 my-0"> <a href="/article/942196" class="d-block text-truncate" title='Android:从 Android Java 源代码创建 UML [已关闭]' aria-label='Android:从 Android Java 源代码创建 UML [已关闭]'> Android:从 Android Java 源代码创建 UML [已关闭] </a> </h4> <div class="col-lg-12 text-break text-muted brief mt-2"> Closed 这个问题正在寻求书籍 工具 软件库等的推荐 不满足堆栈溢出指南 help closed questions 目前不接受答案 我正在寻找一个可以从我的 Java Android 源代码自动创建 Uml 的程序 我测试过ArgoU </div> </li> <li class="list-group-item bg-white"> <h4 class="h6 my-0"> <a href="/article/942197" class="d-block text-truncate" title='减少条形图中 x 轴刻度(标签)的数量' aria-label='减少条形图中 x 轴刻度(标签)的数量'> 减少条形图中 x 轴刻度(标签)的数量 </a> </h4> <div class="col-lg-12 text-break text-muted brief mt-2"> 我正在使用lattice包中的条形图 我有 10 年前的时间序列数据 我希望 x 轴以 b Y 格式显示 间隔六个月 这可以在 xyplot 给定日期向量 DateVector 中轻松完成 语法如下 scales list x list f </div> </li> <li class="list-group-item bg-white"> <h4 class="h6 my-0"> <a href="/article/942198" class="d-block text-truncate" title='Highcharts:仅针对单个系列的工具提示' aria-label='Highcharts:仅针对单个系列的工具提示'> Highcharts:仅针对单个系列的工具提示 </a> </h4> <div class="col-lg-12 text-break text-muted brief mt-2"> 我的系列中有 3 个数据集 低 正常 高 显示在散点图上 如何强制仅对普通数据集启用工具提示和标记 非常感谢 格式化程序 功能用于格式化工具提示文本的回调函数 返回 false 以禁用系列上特定点的工具提示 参考 http api high </div> </li> <li class="list-group-item bg-white"> <h4 class="h6 my-0"> <a href="/article/942199" class="d-block text-truncate" title='在 PHP 中检索 <title> 的最快方法' aria-label='在 PHP 中检索 <title> 的最快方法'> 在 PHP 中检索 <title> 的最快方法 </a> </h4> <div class="col-lg-12 text-break text-muted brief mt-2"> 我正在做一个书签系统 并寻找最快 最简单 的方法来使用 PHP 检索页面标题 如果有类似的东西就好了 title page title url </div> </li> </ul> </div> <div class="card border-0 rounded shadow-sm mb-3"> <div class="card-header border-0 rounded-top bg-white"> <h3 class="h6 font-weight-400 my-0"> 热门标签 </h3> </div> <ul class="list-unstyled right-font d-flex flex-wrap bg-white px-3 py-2 m-0"> <li class="px-2 py-1 badge-pill badge-light right-tag mr-2 mb-2"> <h4 class="h6 my-0"> <a href="/topic/36867" class="d-block text-truncate right-font"> OoD </a> </h4> </li> <li class="px-2 py-1 badge-pill badge-light right-tag mr-2 mb-2"> <h4 class="h6 my-0"> <a href="/topic/36866" class="d-block text-truncate right-font"> 论文解读一 </a> </h4> </li> <li class="px-2 py-1 badge-pill badge-light right-tag mr-2 mb-2"> <h4 class="h6 my-0"> <a href="/topic/36864" class="d-block text-truncate right-font"> 数据标注 </a> </h4> </li> <li class="px-2 py-1 badge-pill badge-light right-tag mr-2 mb-2"> <h4 class="h6 my-0"> <a href="/topic/36863" class="d-block text-truncate right-font"> easydl </a> </h4> </li> <li class="px-2 py-1 badge-pill badge-light right-tag mr-2 mb-2"> <h4 class="h6 my-0"> <a href="/topic/36862" class="d-block text-truncate right-font"> xxxMapper </a> </h4> </li> <li class="px-2 py-1 badge-pill badge-light right-tag mr-2 mb-2"> <h4 class="h6 my-0"> <a href="/topic/36860" class="d-block text-truncate right-font"> 搭建个人简历网站 </a> </h4> </li> <li class="px-2 py-1 badge-pill badge-light right-tag mr-2 mb-2"> <h4 class="h6 my-0"> <a href="/topic/36859" class="d-block text-truncate right-font"> 中的值详解 </a> </h4> </li> <li class="px-2 py-1 badge-pill badge-light right-tag mr-2 mb-2"> <h4 class="h6 my-0"> <a href="/topic/36858" class="d-block text-truncate right-font"> 无法获取到 </a> </h4> </li> <li class="px-2 py-1 badge-pill badge-light right-tag mr-2 mb-2"> <h4 class="h6 my-0"> <a href="/topic/36857" class="d-block text-truncate right-font"> offbord </a> </h4> </li> <li class="px-2 py-1 badge-pill badge-light right-tag mr-2 mb-2"> <h4 class="h6 my-0"> <a href="/topic/36856" class="d-block text-truncate right-font"> 自动控制原理若干概念 </a> </h4> </li> <li class="px-2 py-1 badge-pill badge-light right-tag mr-2 mb-2"> <h4 class="h6 my-0"> <a href="/topic/36855" class="d-block text-truncate right-font"> gMock </a> </h4> </li> <li class="px-2 py-1 badge-pill badge-light right-tag mr-2 mb-2"> <h4 class="h6 my-0"> <a href="/topic/36854" class="d-block text-truncate right-font"> 静态与动态内存分配 </a> </h4> </li> <li class="px-2 py-1 badge-pill badge-light right-tag mr-2 mb-2"> <h4 class="h6 my-0"> <a href="/topic/36853" class="d-block text-truncate right-font"> 流和消息缓冲区 </a> </h4> </li> <li class="px-2 py-1 badge-pill badge-light right-tag mr-2 mb-2"> <h4 class="h6 my-0"> <a href="/topic/36852" class="d-block text-truncate right-font"> neither </a> </h4> </li> <li class="px-2 py-1 badge-pill badge-light right-tag mr-2 mb-2"> <h4 class="h6 my-0"> <a href="/topic/36851" class="d-block text-truncate right-font"> 使用学习 </a> </h4> </li> <li class="px-2 py-1 badge-pill badge-light right-tag mr-2 mb-2"> <h4 class="h6 my-0"> <a href="/topic/36850" class="d-block text-truncate right-font"> mx6ull </a> </h4> </li> <li class="px-2 py-1 badge-pill badge-light right-tag mr-2 mb-2"> <h4 class="h6 my-0"> <a href="/topic/36849" class="d-block text-truncate right-font"> 一文知晓嵌入式 </a> </h4> </li> <li class="px-2 py-1 badge-pill badge-light right-tag mr-2 mb-2"> <h4 class="h6 my-0"> <a href="/topic/36847" class="d-block text-truncate right-font"> 语言程序概述 </a> </h4> </li> <li class="px-2 py-1 badge-pill badge-light right-tag mr-2 mb-2"> <h4 class="h6 my-0"> <a href="/topic/36846" class="d-block text-truncate right-font"> 语言系列 </a> </h4> </li> <li class="px-2 py-1 badge-pill badge-light right-tag mr-2 mb-2"> <h4 class="h6 my-0"> <a href="/topic/36845" class="d-block text-truncate right-font"> 浅谈嵌入式 </a> </h4> </li> <li class="px-2 py-1 badge-pill badge-light right-tag mr-2 mb-2"> <h4 class="h6 my-0"> <a href="/topic/36844" class="d-block text-truncate right-font"> 脚本中内嵌可执行文件 </a> </h4> </li> <li class="px-2 py-1 badge-pill badge-light right-tag mr-2 mb-2"> <h4 class="h6 my-0"> <a href="/topic/36843" class="d-block text-truncate right-font"> 脚本的几种方法 </a> </h4> </li> <li class="px-2 py-1 badge-pill badge-light right-tag mr-2 mb-2"> <h4 class="h6 my-0"> <a href="/topic/36842" class="d-block text-truncate right-font"> 脚本内调用另外一个 </a> </h4> </li> <li class="px-2 py-1 badge-pill badge-light right-tag mr-2 mb-2"> <h4 class="h6 my-0"> <a href="/topic/36841" class="d-block text-truncate right-font"> 通信的实现 </a> </h4> </li> <li class="px-2 py-1 badge-pill badge-light right-tag mr-2 mb-2"> <h4 class="h6 my-0"> <a href="/topic/36840" class="d-block text-truncate right-font"> 时间组件 </a> </h4> </li> <li class="px-2 py-1 badge-pill badge-light right-tag mr-2 mb-2"> <h4 class="h6 my-0"> <a href="/topic/36839" class="d-block text-truncate right-font"> 谷粒学院知识点总结 </a> </h4> </li> <li class="px-2 py-1 badge-pill badge-light right-tag mr-2 mb-2"> <h4 class="h6 my-0"> <a href="/topic/36838" class="d-block text-truncate right-font"> 提取特征 </a> </h4> </li> </ul> </div> </div> </div> </div> <footer class="text-muted small bg-dark py-4 mt-3" id="footer"> <div class="container"> <div class="row"> <div class="col"> Powered by Hwhale <!-- 其他信息请追加此处 --> </div> </div> </div> </footer> <!--[if ltg IE 9]> <script>window.location = '/browser';</script> <![endif]--> <script src="/lang/zh-cn/lang.js?13"></script> <script src="/view/js/jquery.min.js?13"></script> <script src="/view/js/popper.min.js?13"></script> <script src="/view/js/bootstrap.min.js?13"></script> <script src="/view/js/copyxn.js?13"></script> <script src="/view/js/bootstrap-plugin.js?13"></script> <script src="/view/js/async.min.js?13"></script> <script src="/view/js/form.js?13"></script> <script> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?346221f3ab3bcc7f46ef28d352ee78b9"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script> <script> var host = window.location.host; if (host =="www.hwhale.com"){ (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); } </script> <script> var debug = DEBUG = 0; var url_rewrite_on = 3; var url_path = '/'; var fid = 3; var uid = 0; var gid = 0; xn.options.water_image_url = '/view/img/water-small.png'; /*水印图片 / watermark image*/ </script> <script src="/view/js/hwhale.js?13"></script> <!--图片赖加载需要的自己删掉注释 <script src="/view/js/echo.min.js?13"></script> <script> (function ($) { path = "/"; $("body img").each(function(k, v){var img = $("img").get(k).outerHTML;img = img.replace('src', 'data-echo');$(this).replaceWith(img);}); })(jQuery); echo.init({offset: 100,throttle: 250,unload: false}); </script> --> <!-- Scroll to Top Button--> <a class="scroll-to-top rounded" href="javascript:void(0);"> <i class="icon-angle-up"></i> </a> <!-- Scroll to bottom Button--> <a class="scroll-to-bottom rounded" href="javascript:void(0);" style="display: inline;"> <i class="icon-angle-down"></i> </a> </body> </html> <link href="/view/css/vs2015.css" rel="stylesheet"> <script src="/view/js/highlight.pack.js"></script> <script src="/view/js/highlightjs-badge.min.js"></script> <script> // $("code").wrapInner(document.createElement("pre")); if( $("[allenmark_388]").attr('allenmark_388')>0){ $("#ref_question").html(' 网友还发现一个类似的问题请参阅:https://stackoverflow.com/questions/'+$("[allenmark_388]").attr('allenmark_388')+'/'); } var originalElements = document.querySelectorAll('span[fhref]'); originalElements.forEach(function(originalElement) { var originalInnerText = originalElement.innerText; var originalHref = originalElement.getAttribute('fhref'); var newElement = document.createElement('span'); var newText = document.createTextNode(originalInnerText + ' ' + originalHref); newElement.appendChild(newText); originalElement.parentNode.replaceChild(newElement, originalElement); }); setTimeout(function () { var pres = document.querySelectorAll("pre>code"); for (var i = 0; i < pres.length; i++) { hljs.highlightBlock(pres[i]); } var options = { contentSelector: ".message", // Delay in ms used for `setTimeout` before badging is applied // Use if you need to time highlighting and badge application // since the badges need to be applied afterwards. // 0 - direct execution (ie. you handle timing loadDelay:0, // CSS class(es) used to render the copy icon. copyIconClass: "icon-copy", // CSS class(es) used to render the done icon. checkIconClass: "icon-heart", // hook to allow modifying the text before it's pasted onBeforeTextCopied: function(text, codeElement) { return text; // you can fix up the text here } }; window.highlightJsBadge(options); },10); </script> <style> p pre{ display: inline!important; } li pre{ display: inline!important; } "@media print { .code-badge { display: none; } } .code-badge-pre { position: relative; } .code-badge { display: flex; flex-direction: row; white-space: normal; background: transparent; background: #333; color: white; font-size: 0.8em; opacity: 0.5; border-radius: 0 0 0 7px; padding: 5px 8px 5px 8px; position: absolute; right: 0; top: 0; } .code-badge.active { opacity: 0.8; } .code-badge:hover { opacity: .95; } .code-badge a, .code-badge a:hover { text-decoration: none; } .code-badge-language { margin-right: 10px; font-weight: 600; color: goldenrod; display: none; } .code-badge-copy-icon { font-size: 1.2em; cursor: pointer; padding: 0 7px; margin-top:2; } .fa.text-success:{ color: limegreen !important} </style> <script> var forum_url = '/list/3'; var safe_token = '3W2VjM_2FtqI4tiBuRnPbGFBPZ35tlxwSBTgCu2CbhK1DJYykRPEI7A5N1X1JQ_2BHo1_2BA1RwRQW0wOcmXzcxOKZkg_3D_3D'; var body = $('body'); body.on('submit', '#form', function() { var jthis = $(this); var jsubmit = jthis.find('#submit'); jthis.reset(); jsubmit.button('loading'); var postdata = jthis.serializeObject(); $.xpost(jthis.attr('action'), postdata, function(code, message) { if(code == 0) { location.reload(); } else { $.alert(message); jsubmit.button('reset'); } }); return false; }); /*缩放图片,适应屏幕大小*/ function resize_image() { var jmessagelist = $('div.message'); var first_width = jmessagelist.width(); /* 815 : 746; 734 746*/ jmessagelist.each(function() { var jdiv = $(this); var maxwidth = jdiv.attr('isfirst') ? first_width : jdiv.width(); var jmessage_width = Math.min(jdiv.width(), maxwidth); jdiv.find('img, embed, iframe, video').each(function() { var jimg = $(this); var img_width = this.org_width; var img_height = this.org_height; if(!img_width) { var img_width = jimg.attr('width'); var img_height = jimg.attr('height'); this.org_width = img_width; this.org_height = img_height; } /*var percent = xn.min(100, xn.ceil((img_width / jmessage_width) * 100));*/ if(img_width > jmessage_width) { if(this.tagName == 'IMG') { jimg.width(jmessage_width); jimg.css('height', 'auto'); jimg.css('cursor', 'pointer'); jimg.on('click', function() { /*window.open(jimg.attr('src'));*/ }); } else { jimg.width(jmessage_width); var height = (img_height / img_width) * jimg.width(); jimg.height(height); } } }); }); } /*对于超宽的表格,加上响应式*/ function resize_table() { $('div.message').each(function() { var jdiv = $(this); jdiv.find('table').addClass('table').wrap('<div class="table-responsive"></div>'); }); } $(function() { resize_image(); resize_table(); $(window).on('resize', resize_image); }); /*输入框自动伸缩*/ var jmessage = $('#message'); jmessage.on('focus', function() {if(jmessage.t) { clearTimeout(jmessage.t); jmessage.t = null; } jmessage.css('height', '6rem'); }); jmessage.on('blur', function() {jmessage.t = setTimeout(function() { jmessage.css('height', '2.5rem');}, 1000); }); $('#nav li[data-active="fid-3"]').addClass('active'); </script>