[PHP] Conditionally include file based on document location
I would like to know how to conditionally included a file based on the document location. The purpose is for placement of location-specific navigation menus. I'm not interested in DHTML hierarchical drop-down menus, rather inserting ready made HTML files using perhaps (?) DOCUMENT_URI (?) and error checking logic. EXAMPLE If DOCUMENT_URI is "/" (home) then the following file included: URL: <http://www.globalhemp.com/includes/apple.html> If DOCUMENT_URI is "/quicktime/" then the following file included: URL: <http://www.globalhemp.com/includes/quicktime.html> If DOCUMENT_URI is "/quicktime/download/" then the following file included: URL: <http://www.globalhemp.com/includes/quicktime_download.html> The error checking logic would be for child directories that don't have their own include file and thus would use a parent directory include file. If a parent directory file doesn't exist, it would include the top-level (home) include file. The closest PHP example that I have found thus far follows: [INCOMPLETE] PHP CONDITIONAL INCLUDE EXAMPLE Extracted from: <http://www.jwweb.com/20010629.html> ------------ THANKS! Eric C. Pollitt, Founder 401 E. Illinois Ave. Peoria, IL 61603 Global Hemp - Portal to the hemp community http://www.globalhemp.com/ Create like a god. Command like a king. Work like a slave! -- Constantin Brancusi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Image resolution and php
I believe that image files on the Mac platform contain metadata that does in fact include this information. Sherlock on Mac OS 9 is not capable of finding this information. However, I did find the following information for Adobe Photoshop 7 for Mac OS X on how you can achieve this. I don't know if Adobe Photoshop 7 for Windows can do this. From: http://www.apple.com/macosx/applications/photoshop/ You have thousands of digital pictures and graphics stored on your hard disk. Wouldn¹t it be cool to be able to verify what¹s in an image file before you click on it? Adobe thought so too, which is why the new File Browser in Photoshop 7.0 lets you do just that. The File Browser lets you view your thumbnails and image metadata like color profile, date modified, and the Exchangeable Image File (EXIF) information generated by digital cameras to make sure the images are what you¹re looking for before you open them. As an added convenience, Photoshop lets you add ranking to your file criteria. You can have your own ranking system for identifying images with, for example, rankings such as ³Proof² and ³Final.² You can also sort images by file name, file width and height, file size, file type, resolution, color profile, date created, date modified and copyright. The File Browser also gives you the added advantage of being able to search for images visually rather than just by file name. Eric C. Pollitt, Founder 401 E. Illinois Ave. Peoria, IL 61603 Global Hemp - Portal to the hemp community http://www.globalhemp.com/ "Prohibition will work great injury to the cause of temperance. It is a species of intemperance within itself, for it goes beyond the bounds of reason in that it attempts to control a man's appetite by legislation, and makes a crime out of things that are not crimes. A Prohibition law strikes a blow at the very principles upon which our government was founded." Abraham Lincoln in a speech to the Illinois House of Representatives on December 18, 1840. > From: "Jome" <[EMAIL PROTECTED]> > Date: Wed, 18 Sep 2002 14:10:58 +0200 > To: [EMAIL PROTECTED] > Subject: [PHP] Re: Image resolution and php > >> I need to get resolution information (dpi) from any >> image of jpg, gif or png formats. >> >> It would be sufficient to obtain pixel and inches >> dimension of such images and calculate resolution by >> simply dividing but I haven't found any function that >> gets effective dimensions in inches. > > http://www.php.net/manual/en/function.getimagesize.php > > I'm sligthly confused about what you're looking for, but the above URL > *could* be something. > > Jome > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mid-level PHP/MySQL people in Los Angeles?
I recommend checking out websites such as Elance for freelance workers and employers to find one another. <http://www.elance.com/> There are several others out there that are similar as well...try searing <http://dmoz.org/Business/Business_Services/Consulting/Marketplaces/Remotely _Provided_Services/> to find more. PS I am not affiliated with Elance, just a suggestion. Eric C. Pollitt, Founder 401 E. Illinois Ave. Peoria, IL 61603 Global Hemp - Portal to the hemp community http://www.globalhemp.com/ Create like a god. Command like a king. Work like a slave! -- Constantin Brancusi > From: PHP freak <[EMAIL PROTECTED]> > Date: Tue, 17 Sep 2002 22:44:30 -0700 > To: [EMAIL PROTECTED] > Subject: [PHP] mid-level PHP/MySQL people in Los Angeles? > > I'm looking for 1 or 2 people with good PHP/MySQL experience in the Los > Angeles area. > > I have a few steady projects that pay $20/hr. > (All of them 100% PHP/MySQL. All of them fun/non-corporate music-based > sites.) > > If interested, please email my personal address: "[EMAIL PROTECTED]" > Include your contact info & any sites/projects you've worked on. > > Thanks! > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Conditionally include file based on document location
Thanks for the insight, but I'm not clear on how to implement this. Here is what I have so far: Perhaps $DOCUMENT_URI is not correct...perhaps it should be $PATH_INFO? Or should I have some sort of return or print statement? TEST URL: http://globalhemp.phpwebhosting.com/switch.php Thanks, Eric C. Pollitt, Founder 401 E. Illinois Ave. Peoria, IL 61603 Global Hemp - Portal to the hemp community http://www.globalhemp.com/ "Hemp is of first necessity to commerce and marine, in other words, to the wealth and protection of the country." -- Thomas Jefferson > From: Marek Kilimajer <[EMAIL PROTECTED]> > Date: Wed, 18 Sep 2002 10:59:46 +0200 > To: PHP <[EMAIL PROTECTED]> > Subject: Re: [PHP] Conditionally include file based on document location > > switch($DOCUMENT_URI) { > case '/': > include(" watch you want"); > break; > case > > } > > Eric C. Pollitt wrote: > >> I would like to know how to conditionally included a file based on the >> document location. >> >> The purpose is for placement of location-specific navigation menus. >> >> I'm not interested in DHTML hierarchical drop-down menus, rather inserting >> ready made HTML files using perhaps (?) DOCUMENT_URI (?) and error checking >> logic. >> >> >> EXAMPLE >> >> If DOCUMENT_URI is "/" (home) then the following file included: >> >> URL: <http://www.globalhemp.com/includes/apple.html> >> >> If DOCUMENT_URI is "/quicktime/" then the following file included: >> >> URL: <http://www.globalhemp.com/includes/quicktime.html> >> >> If DOCUMENT_URI is "/quicktime/download/" then the following file included: >> >> URL: <http://www.globalhemp.com/includes/quicktime_download.html> >> >> >> The error checking logic would be for child directories that don't have >> their own include file and thus would use a parent directory include file. >> If a parent directory file doesn't exist, it would include the top-level >> (home) include file. >> >> The closest PHP example that I have found thus far follows: >> >> >> [INCOMPLETE] PHP CONDITIONAL INCLUDE EXAMPLE >> Extracted from: <http://www.jwweb.com/20010629.html> >> >> > if ($location == "quicktime") { >> include("quicktime.inc"); >> if ($location == "quicktime/download") { >> include("download.inc"); >> } else { >> include("home.inc"); >> } >> ?> >> >> >> THANKS! >> >> Eric C. Pollitt, Founder >> 401 E. Illinois Ave. >> Peoria, IL 61603 >> Global Hemp - Portal to the hemp community >> http://www.globalhemp.com/ >> >> Create like a god. Command like a king. Work like a slave! >> -- Constantin Brancusi >> >> >> >> > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] editor php
I haven't tried this, but it's a PHP Class named, "EditPHP." http://spunge.mirrors.phpclasses.org/goto/browse.html/package/43.html Eric C. Pollitt, Founder 401 E. Illinois Ave. Peoria, IL 61603 Global Hemp - Portal to the hemp community http://www.globalhemp.com/ "Hunt out places and soil suitable for flax and hemp, and let them there be grown." -- Brigham Young, 1861 > From: Gian Michele <[EMAIL PROTECTED]> > Date: Thu, 19 Sep 2002 17:57:48 +0200 > To: [EMAIL PROTECTED] > Subject: [PHP] editor php > > Hi, > does any body knows a cool editor for php that run under redhat 7.x and > where i can find? > tanks -- Gian Michele > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php