PHP:如何只从根目录中搜索文件,而不从其他文件夹中搜索?
我为搜索引擎爬虫器/索引器提供了带有$baseurl的php代码。现在,下面的代码为根html文件以及所有其他文件夹(以及其他html文件)编制索引 我工作的网站是我只想从根目录索引html文件,而不需要任何其他文件夹或子文件夹。因此,我必须修改以下代码中的某些内容:PHP:如何只从根目录中搜索文件,而不从其他文件夹中搜索?,php,html,search,Php,Html,Search,我为搜索引擎爬虫器/索引器提供了带有$baseurl的php代码。现在,下面的代码为根html文件以及所有其他文件夹(以及其他html文件)编制索引 我工作的网站是我只想从根目录索引html文件,而不需要任何其他文件夹或子文件夹。因此,我必须修改以下代码中的某些内容: //Baselink to search with trailing slash var $baseurl = "https://neculaifantanaru.com/"; // v
//Baselink to search with trailing slash
var $baseurl = "https://neculaifantanaru.com/";
// var $baseurl = "http://www.yoursite.com/aSubDirectory/";
//Serverpath of your baseurl - including trailing slash (something like
/users/mac/www/envato.homac.at/htdocs/demos/LiveSearch/) ... ONLY necessary for thumbnail creation
var $basepath = "/users/envato/www/neculaifantanaru.com/htdocs/";
//disable indexing of paths above basurl path
//makes only sense when you are using a subdirectory below your root of the website and only like to
stay there
var $dontIndexUpperDirsOfBaseUrl = false; //basurl parent paths will be followed
// var $dontIndexUpperDirsOfBaseUrl = true; //basurl parent paths won't be followed
//absolute URL to you ls folder with trailing slash
var $lsurl = "https://neculaifantanaru.com/ls/";
//search results page to prevent from heavy load waitings - within $baseurl
var $searchresultspage = "search.php";
//excluding files and directories from indexing under $basedir beginning with:
//this means the links on these pages won't be followed,
//works with pdf files too
//regular expressions can be used
// var $excl = array(".*-dates/",
// "secret.html",
// "hide",
// );
var $excl = false;
//including files and directories under $basedir with:
//don't forget trailing slashes for directories
//you can set it to false too
//these pages will be indexed, the links on it and its content
//works with pdf files too
// var $incl = array("hallo3.txt",
// );
var $incl = false;