|
#9
| |||
| |||
| ah... then to protect one's own applications or projects what lines do i need to invoke to activate this feature?
__________________ Wow... now even cuter! Meow! Workstation:G5 Dual 2Ghz 8Gb Ram, 160GB Serial ATA (system) & SohoRaid 250Gb x2 (work), ATI RADEON 9600 Pro, 20" Apple Display, iSticks with Sub Laptop: PowerBook G4 15", 768Mb Ram, 60Gb HD & SuperDrive Connection: 6Mbit ADSL with P2P Music: Samsung YP-55 256Mb MP3 Player Sennheiser HD-25 closed head phones. Mobile: Sony Ericsson P900 with 128Mb MemoryDuo |
|
#10
| ||||
| ||||
| It's not a feature, per se, it's just the way PHP works. Here's a short example I wipped up for you: http://trogdor.myvnc.com:81/~amras/config_example/ Let's say you have a file called config.php containing something like: Code: <?php // This is an example configuration file in PHP // by Michael Sanford for www.macosx.com $config['username'] = 'michael'; $config['password'] = 'michael1'; $config['host'] = 'michaelsanford.com'; ?> Code: <?php
// This is an example configuration file in PHP
// by Michael Sanford for www.macosx.com
// call the configuration script
include("./config_example.php");
echo "Username: " . $config['username'] . "<br />";
echo "Password: " . $config['password'] . "<br />";
echo "Host: " . $config['host'] . "<br />";
?> Now that you even know the URL of my configuration script ( http://trogdor.myvnc.com:81/~amras/c...ig_example.php ) try and hack it so you can print the $config variable elements...you'll have a pretty hard time doing it. PS The thing to keep in mind here is that PHP means Hypertext PRE PROCESSOR, which means the code is executed before it's sent to the client. So even if you knew the URL of your configuration file and tried to curl it in the terminal, the server would just process the file, find there's no HTML output and download an empty file.
__________________ michaelsanford.com Blog Twitter Tumblr LinkedIn iMac Aluminum 24" | MacOS X 10.5-current | 3.06 GHz Intel Core Duo | 4 GB RAM | 1 TB HDD iBook G4 1.42 GHz | MacOS X 10.5-current | 1 GB RAM, 100 GB HDD AMD Athlon64 3500+ | Slackware 12 (2.6.21.5-smp) | 2 GB RAM, 2120 GB RAID 1, 2500 GB RAID 0 |
|
#11
| ||||
| ||||
| Everthing you ever wanted to know about Apache can be found at Apache.org... Look in the HTTP 1.3 section. Also, I've found it easier to change the ownership/permissions of the httpd.conf file so that I can edit is as my non-root administrator password... So I don't need to mess with any command line suff... I just use BBedit. ...Oh... and everything you want to know about PHP is at php.net.
__________________ TommyWillB Intel iMac "early 2006" core duo TommyWillB.com hosted on Mac OS X 10.5.x / Apache 2.2.x / PHP 5.x |
![]() |
| Thread Tools | |
|
|