E
E
Egor Antropov2020-01-31 12:40:35
Email
Egor Antropov, 2020-01-31 12:40:35

How to find out if there is text between slashes?

I need to add a class to one element in header.php only if the address bar goes: site.ru/projects/something/else_something.

Those. if after projects there is a subsection and the name of the project.

Answer the question

In order to leave comments, you need to log in

6 answer(s)
P
Pavel, 2019-05-09
@1Sergey1

None in essence. You have to prove ownership of the domain with various headers and server settings, which is what Google essentially checks for. If the header and server data diverge, then this will be spam.

D
Dmitry Shitskov, 2019-05-09
@Zarom

Any system will perceive such emails as spam. And the whole answer. Unless you are the owner of these arbitrary domains

M
Monreo, 2019-06-11
@Monreo

Such letters will always be perceived as spam - and not only by Google. In order for everything to come to the inbox, you need to figure out the technical settings: https://www.unisender.com/ru/blog/sovety/rassylki-...

E
Egor Antropov, 2020-01-31
@Relow

preg_match("/\/projects\/([a-zA-Z0-9_\-]+)\/([a-zA-Z0-9_\-]+)\//i", $GLOBALS["APPLICATION "]->GetCurPage(), $matches);
if (!empty($matches)) {
$project_page = "project_page";
}

A
Alex, 2020-01-31
@Kozack

Determine by$_SERVER["REQUEST_URI"]

F
FanatPHP, 2020-01-31
@FanatPHP

explode()
count()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question