Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/287.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 使用面包屑url';s_Php_Breadcrumbs - Fatal编程技术网

Php 使用面包屑url';s

Php 使用面包屑url';s,php,breadcrumbs,Php,Breadcrumbs,我开发了一个有很多文件的网站。 我已经为他们制作了一个目录并放在那里 我需要知道是否可以创建自定义url路径,以便我的社区能够看到url, 而不是 我还想让用户输入,例如,将他们带到, 然后仍然显示 多谢各位 我正在我的网站上使用Smarty 这里是我的配置文件的内容,如果有帮助的话 <?php session_start(); $conn = new mysqli("localhost", "root", "", "d

我开发了一个有很多文件的网站。 我已经为他们制作了一个目录并放在那里

我需要知道是否可以创建自定义url路径,以便我的社区能够看到url, 而不是

我还想让用户输入,例如,将他们带到, 然后仍然显示

多谢各位

我正在我的网站上使用Smarty

这里是我的配置文件的内容,如果有帮助的话

<?php
session_start();
$conn = new mysqli("localhost", "root", "", "dev");
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}
   define ('ROOT_PATH', realpath(dirname(__FILE__)));
   define ('INCLUDE_PATH', realpath(dirname(__FILE__) . '/includes' ));
   define('BASE_URL', 'http://localhost/');

function getMultipleRecords($sql, $types = null, $params = []) {
 global $conn;
 $stmt = $conn->prepare($sql);
 if (!empty($params) && !empty($params)) {
    $stmt->bind_param($types, ...$params);
  }
  $stmt->execute();
  $result = $stmt->get_result();
  $user = $result->fetch_all(MYSQLI_ASSOC);
  $stmt->close();
  return $user;
}
function getSingleRecord($sql, $types, $params) {
  global $conn;
  $stmt = $conn->prepare($sql);
  $stmt->bind_param($types, ...$params);
  $stmt->execute();
  $result = $stmt->get_result();
  $user = $result->fetch_assoc();
  $stmt->close();
  return $user;
}
function modifyRecord($sql, $types, $params) {
  global $conn;
  $stmt = $conn->prepare($sql);
  $stmt->bind_param($types, ...$params);
  $result = $stmt->execute();
  $stmt->close();
  return $result;
}
?>

在Apache HTTP服务器中,使用URL重写

选择1 在应用程序的根目录中创建一个
.htaccess
文件,其中包含以下内容:

RewriteEngine On
Options FollowSymLinks
RewriteRule / /modules/webview/pages/index.php
RewriteRule /forum /modules/webview/addons/forum
选择2
如果您有权访问
httpd.conf
,在
中插入与应用程序根目录匹配的行。

哪个http服务器正在运行您的http脚本?现在,我正在使用最新版本的php和MySQL在xampp上运行它。在您完全没有提及的情况下,我们如何知道您项目的结构和使用的编程技术?请添加更多详细信息,否则您的问题将被关闭和/或否决。XAMPP不是服务器,尽管我们可以猜测您现在正在运行Apache 2.4。是的,我不擅长在文本中解释问题。我通过语音通信做得更好。我只想创建一个假路径,将用户带到真实文件,同时仍显示假路径。您的选项一给了我一个服务器错误。服务器错误!服务器遇到内部错误,无法完成您的请求。服务器过载或CGI脚本中存在错误。使用第二个选项,我可以这样做,但上传到我的网络主机帐户时不行。我已经编辑了答案,在路径上添加了
/
。如果它不起作用,请尝试阅读…谢谢。但我明白了。我现在知道了如何显示假uri路径,并在假uri路径中键入,同时仍然显示真实的文件。