Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 680451
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T01:22:27+00:00 2026-05-14T01:22:27+00:00

in windows (using apache as server), my file path directory will be C:\xampp\htdocs\mysvn\PhpDocumentor\phpdoc.php. But

  • 0

in windows (using apache as server), my file path directory will be C:\xampp\htdocs\mysvn\PhpDocumentor\phpdoc.php. But what happen with other OS such as linux on APACHE, or IIS on windows, Or other OS i don’t know and never use ?

i would like to know to make sure i wrote the bullet proof, file reading via PHP.

Care anyone give an example path according to different OS and Server ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T01:22:28+00:00Added an answer on May 14, 2026 at 1:22 am

    I often create a configuration file for each project, and inside that define some paths in a few constants. Use those constants any time you want to include files from then on:

    // config.php
    define('ROOT', dirname(__FILE__));
    define('LIBS', ROOT . '/libs');
    
    // some other file.php
    include LIBS . '/mylib.php';
    

    Though Windows typically uses backslashes as path separators, it’s smart enough to handle both, so using forward slashes is safe.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an Apache server installed on my windows machine using XAMPP. Now I'm
I want to execute a .exe file on my Apache server using a php
I have an apache server installed on my portable windows 7 machine using xampp
I'm trying to setup an Apache/PHP/Postgresql server locally on my machine. I'm using Windows
I'm using a PHP-JAVA bridging using Apache thrift. A java server file, it is
On Windows using WAMPserver (Apache, MySQL, PHP) I have the following: //test.php if (!defined('LC_MESSAGES'))
I am using Apache Server 6.0 and I am trying to update a file
I'm attempting to set up a windows-based FTP server using Apache FTPServer, however I
I'm using CodeIgniter on a Windows machine using the Zend Comunity Server with apache.
When i tried to connect to Apache Cassandra server using the php code i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.