Php How To Include File In Windows
RegisterLogin
Php How To Include File In Windows
Post Description: If You Are Having Problems Including A Php File In Windows Because Of The Slashes Are Backwards This Post Will Help You Find How To Fix And Get Around This Obsticle
Tags: Php, How, To, Include, File, In, Windows
This Post Was Posted On Jan 17, 2010 By Webune Support #3056
Post Description: If You Are Having Problems Including A Php File In Windows Because Of The Slashes Are Backwards This Post Will Help You Find How To Fix And Get Around This Obsticle
Tags: Php, How, To, Include, File, In, Windows
This Post Was Posted On Jan 17, 2010 By Webune Support #3056
Php How To Include File In Windows by Webune Support
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
Leave Your Comments
Related Pages: [Add Your Website]
Post New Topic
©2011 Webune Forums - Sun Dec 18, 2011 4:52 pm
Powered by: Webune Forums V3
Powered by: Webune Forums V3