Category Archives: PHP

ALL posts related to PHP

Reading a file from file system using javascript

Reading a file into javascript variable is a issue anyone can face while developing client side application.
The problem has different solution depending on platform/browser
Solution

1) Windows/IE : Use the available FileSystemObject. It allows one to read and write files from local machine.

2) Firefox: It does not have a object corresponding to FileSystemObject in IE. So [...]

Also posted in javascript | Tagged , | Leave a comment

php - Supress-warnings

Yesterday i was working on PHP’s file handling functions. Due to default permissions i was getting default warnings generated by PHP Engine. I decided to suppress the warning messages. Found out a very simple solution for this problem.
Just need to put a @ before calling file handling functions.
$handle = @ fwrite(”abc.txt”, “w”);
After this warning messages [...]

Posted in PHP | Tagged | Leave a comment

Execute a HTTP POST Using PHP CURL from one PHP to other.

I had a typical issue in my project where i had to pass request variables from one PHP to other with using FORM tag.
Example flow

a.php gets parameters from client passes it to b.php
b.php gets the params and had to pass those to c.php without people knowing.

It may seem easy but i had to scratch my [...]

Posted in PHP | Tagged , , | Leave a comment

WAMP and phpMyAdmin #1045 Access denied for user ‘root’@'localhost’ (using password: NO) problem’s Solution

Most of the people who are new to wamp do get this problem. I faced the similar problem. I setup wamp on my XP machine and everything ran fine.
I went into phpmyadmin and it gave me a warning that I should put a password up for mysql, otherwise people could just log right in, so [...]

Posted in PHP | Tagged | 2 Comments