Jump to content
Larry Ullman's Book Forums

Base Uri And Url Settings, Chapter 3


Recommended Posts

I am using the eCommerce book as a text in an Advanced Dreamweaver for eCommerce class.

My students have some questions about the definitions of constants on page 58, as follows:

 

// ************ CONSTANTS *********** //

// Determine location of files and the URL of the site:
define ('BASE_URI', '/path/to/dir/');
define ('BASE_URL', 'www.example.com/');
define ('PDFS_DIR', BASE_URI . 'pdfs/');
define ('MYSQL', BASE_URI . 'mysql.inc.php');

 

 

Larry, could you define exact values for file & folder paths of these constants for students using WAMP and MAMP localhost testing environments.

 

Thanks,

 

--RKaye

Link to comment
Share on other sites

Thanks for using my book for your class. It is appreciated. 

 

As for these values, it really depends upon how the software is installed and how the computer is configured. For example, on MAMP, the BASE_URI would be /Applications/MAMP/htdocs (I think). Unless the user changes where the web root directory is. Also, if the student puts the files within a subdirectory of that web root, the subdirectory would have to be added.

 

For WAMP, I've never used that, but assuming you're talking about wampserver, on that product's site it says that c:\wamp\www is the web root directory. So that would be the BASE_URI value, unless a subdirectory is being used.

 

The BASE_URL would be localhost/, unless a port is being used (which I think is the case on MAMP): localhost:8888/. And if a subdirectory is used, that'd have to be added to the URL, too. 

Link to comment
Share on other sites

 Share

×
×
  • Create New...