PHP file inclusion function include() vs require() vs include_once() vs require_once()

PHP file inclusion function include() vs require() vs include_once() vs require_once()

In PHP, insert the same PHP, HTML, or text on multiple pages using include(), include_once(), require() and require_once(). In this article we are going to see real differences between them with an example. Menu page menu.php <?PHP echo '<a href="home.php">Home</a> - <a href="about.php">About</a> - <a href="contact.php">Contact</a>'; ?> include function When you want to include a file within

How to redirect non-www to www using htaccess (Vice versa)

apache-redirect-http-to-https-using-htaccess-rewrite-rules

For a website or web application user to access the website with or without "www" (e.g. techdasher.com or www.techdasher.com) for same page. It will be consider as "duplicate content". Due to this website rank to be drop. The advantage of redirecting a website -> An unique website url avoid to split the page rank. -> Website

Top