Welcome to Webune Support Forums

Are you tired of you current web hosting provider? not giving you enough service or support. Switch today to Webune. We are programmers like you who understand what type of questions PHP developers ask. Just like you!

Today we are going to cover a question for beginners. When you start to write PHP scripts you will start to use the include() or include_once() functions to include in your php scripts.

so lets say i am using a development server on a windows computer installed with Apache and PHP - so when you start to write your script you cannot use the backslashes.

for example, lets say i want to include this file in my PHP script:

include('C:\inetpub\wwwroot\includes\myfunctions.php');

but its not working because when you use the \ (backslash) it escapes the path. so what is the solution?

the answer to this problem is easy, just switch the \ (backslashes) with the / (forward slashes) so when you include a file do it like this:

include('C:/inetpub/wwwroot/includes/myfunctions.php');

that should work, try it