stop
Starting And Stopping MySQL Using Windows .bat Files
Wed, 05/13/2009 - 15:17 | by philipnorton42I use my PC for a lot of different things, and I don't necessarily need to have MySQL server running all the time, especially when I want to play a game. So I wondered if there was a simple way in which I could start and stop the server using a simple .bat file.
I had a look at the MySQL website and found a page that details how to start MySQL from the command line. This page suggested that I use the following command.
Turn Off PHP Parsing In A Directory
Tue, 12/23/2008 - 15:24 | by philipnorton42Sometimes it is necessary to turn off PHP parsing for a directory. You might want to give away some source code and therefore don't want to parse that code when the user tries to download it. You could just rename the file to have the extension .phps, which is a PHP source file, but this is an alternate method.
To turn off PHP parsing in a directory just create a .htaccess file with the following content.
php_flag engine off
You can expand on this by adding the following:
JavaScript To Stop Frames
Tue, 05/27/2008 - 10:58 | by philipnorton42The following section of JavaScript will detect if anyone is viewing your page in a frame. If they are then the code will redirect them to your site. It essentially stops people using frames to poach your content and stops online proxy software from viewing your site.
if(top.location != location){
top.location.href = document.location.href;
}
All you have to do is include this code either in your script tag or your JavaScript includes. Quite a neat little trick really.