Reserved Words in JavaScript

Reserved Words in JavaScript 1.5
>abstract
else
instanceof
switch
>boolean
enum
int
synchronized
>break
export
interface
this
byte
extends
long
throw
case
false
native
throws
catch
final
new
transient
char
finally
null
true
class
float
package
try
const
for
private
typeof
continue
function
protected
val
debugger
goto
public
var
default
if
return
void
delete
implements
short
volatile
do
import
static
while
double
in
super
with

php exec

The exec() function is one of several functions you can use to pass commands to
the shell. The exec() function requires a string representing the path to the command
you want to run, and optionally accepts an array variable that will contain
the output of the command and a scalar variable that will contain the return value


mod_rewrite?

Rewrites the requested URL on-the-fly based on configuration directives and rules.
You are using system paths. Apache mod_rewrite only works with URLs,
 
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI}  !^(favicon\.ico|assets)  [NC]
RewriteRule  ^(.*)/?$    DestinationFolder/$1        [L]

php file_get_contents


This function is the preferred way to read the contents of a file into a string.
The function itself does nothing but puts the source of the web page you
supply it into a string available for use throughout your script.

<?php
echo file_get_contents("dtd.txt");
?> 

You can use either the curl or the http library. You send a http request, and can use the library to get the information from the http response.


$dat = @file_get_contents( "http://www.bbc.co.uk/" );
if( $dat ) echo htmlentities( $dat );

Cannot modify header information

Check that <?php is at the very start of the functions.php file (before any whitespace)
and remove ?> at the end of that file.

header or setcookie or anything else that sends HTTP headers has
 to be done before 
any other output, or you'll get that warning/error.
 
Remember... anything not inluded in <?php ... ?> 

Use a better text editor to remove what's invisible now before the opening <?php.

Encoding php file

str_rot13()
base64_decode()
 
Try ionCube PHP Encoder, 
link - http://www.ioncube.com/sa_encoder.php 
 

Use $_POST to get input values

It will execute the whole file as PHP. The first time you open it,
 $_POST['submit'] 
won't be set because the form has not been sent.
   
<?php
  if (isset($_POST['submit'])) {
    $example = $_POST['example'];
    $example2 = $_POST['example2'];
    echo $example . " " . $example2;
  }
?>
<form action="" method="post">
  Example value: <input name="example" type="text" />
  Example value 2: <input name="example2" type="text" />
  <input name="submit" type="submit" />
</form>

PHP Write and Read from File


$fp = @fopen ("text1.txt", "r");

$fh = @fopen("text2.txt", 'a+');

if ($fp) {
 //for each line in file
    while(!feof($fp)) {
    //push lines into array
    $thisline = fgets($fp);
    $thisline1 = trim($thisline);

     $stringData = $thisline1. "\r\n";
    fwrite($fh, $stringData);

                  fwrite($fh, "test");

                }
            }
fclose($fp);
fclose($fh);
 
 

Check if image file ??

allow_url_fopen is activated in your PHP config 
 
 $filename = "http://".$_SERVER['SERVER_NAME']."
/media/img/".$row['CatNaam'].".jpg";
 echo"  <img src=\"".$filename."\" alt=\"".$row['CatNaam']."\">";

        

        if (file_exists($filename)) {
            echo "The file $filename exists";
        } else {
            echo "The file $filename does not exist";
        }

PHP mail function

 sendmail cofiguration in php.ini file
 If the smtp server you're trying to relay the