It is possible to reach the site through the url I personnally use as a virtualhost in order not to mix local websites with internet websites. (8888 being the default http port in MAMP) Indeed, in the default configuration, reaching our new project can be done through the use of the following url : The use of virtual hosts can be very useful. Therefore, we will create a Virtual Host. The only directory that should be reachable from an internet client is the public directory. Controllers : will receive the client’s request, treat it, make calls to models and output data in views.Views : will contain files with Html, Css.Models : will contain files with queries to the database.If you’re not new to frameworks like Codeigniter, you know what it means : The application directory contains files structured in the MVC pattern. The ZF shell script will be executed and will generate the directory /Users/my_name/Sites/my_zend/ with the following directory tree : Users/my_name/Sites/ZF/bin/zf.sh create project my_zend Then use the following command to place yourself in MAMP’s Document Root : Open a Terminal window found in Applications/Utilitaires/Terminal. Include_path = “.:/Applications/MAMP/bin/php5.3/lib/php:/Users/olivier/Sites/ZF/library”ĭon’t forget to restart MAMP once your include_path has been modifiedĬreate a ZF project : the Terminal magical way include_path = “.:/Applications/MAMP/bin/php5.3/lib/php” This line has been commented (use of “ ” in front of the line) and replaced by the following: So open your php.ini file (/Applications/MAMP/conf/PHPX.X/php.ini or browse the /Applications/MAMP/ directory to find it (PHPX.X stands for your current PHP version)) and change your include_path : You’ll have to change your php.ini file to declare the path to ZF’s library, which will be required by the applications you’ll create. Unzip it and copy the uncompressed ZF directory to your local web server : /Users/my_name/Sites/ZF/ in my case. #MAMP DIRECTORY FULL#I chose the Zend Framework 1.11.11 Full package for download. #MAMP DIRECTORY DOWNLOAD#That’s the directory in which I’ll set up ZF.įirst download ZF from or follow the “Download Now” link from the homepage. So all my PHP projects are stored in /Users/my_name/Sites/. I’ve changed MAMP’s document root (in /Applications/MAMP/htdocs by default) to : #MAMP DIRECTORY MAC OSX#Zend download (ZF) and local installation on MAMP MAc OSX 10.6.8 More detail can be found on stackexchange.After spending much time in OOP PHP (Object Oriented PHP) and choosing Codeigniter as my first PHP framework, I decided to start working with Zend Framwork which is said to be less lightweight but seems to be a well-documented and universal reference. When a mapped path appears to be disconnected, it will gracefully disable that mapping until you try to access it again, at which point it will attempt to connect again. net use on the other hand is more fault tolerant. If for some reason that location can’t be found, it will try desperately to reconnect at the expense of your computers performance. The main difference between the two is that subst expects the location to always be available. #MAMP DIRECTORY WINDOWS#To map a path to a drive letter, you can use either the subst or net use commands from a Windows command line. On windows, you can get the same functionality for local resources as well. These handy shortcuts keep you from having to navigate down a long tree of folders to reach commonly used resources, wherever they are on your network. You’ve got your report server to access, accounting has their own NAS, there is a backup server, and so on. Mapping network paths to drive letters has been a familiar task in corporate life. Have you ever wanted to create a drive letter mapping within your local system under Windows? Usually the mappings are reserved for network paths, but it can be useful for development (or even just as a shortcut) to map a local path to a drive letter.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |