Logo educatepk.com
MCQs & Books free for all subjects and educational help  
Subscribe email alerts:
MCQs Online
MCQs on PHP General
Books
MCQs on PHP General
All php mcq are available here.
Option image

Q No.1 of 10

What is the correct way to open the file "time.txt" as readable
Option 1
fopen("time.txt","r");
Option 2
fopen("time.txt","r+");
Option 3
open("time.txt","read");
Option 4
open("time.txt");
Q No.2 of 10

PHP allows you to send emails directly from a script
Option 1
True
Option 2
False
Q No.3 of 10

What is the correct way to connect to a MySQL database
Option 1
mysql_connect("localhost");
Option 2
dbopen("localhost");
Option 3
connect_mysql("localhost");
Option 4
mysql_open("localhost");
Q No.4 of 10

What is the correct way to add 1 to the $abc variable
Option 1
abc++;
Option 2
$abc=+1
Option 3
$abc++;
Option 4
++abc
Q No.5 of 10

fopen($file_doc,”r+"); opens a file for
Option 1
writing
Option 2
reading
Option 3
both of these
Option 4
non of these
Q No.6 of 10

To work with remote files in PHP you need to enable
Option 1
allow_remote_files
Option 2
allow_url_fopen
Option 3
all of these
Option 4
non of these
Q No.7 of 10

The function setcookie( ) is used to
Option 1
Enable or disable cookie support
Option 2
Declare cookie variables
Option 3
Store data in cookie variable
Option 4
All of these
Q No.8 of 10

Which of the following mode of fopen() function opens a file only for writing. If a file with that name does not exist, attempts to create anew file. If the file exist, place the file pointer at the end of the file after all other data.
Option 1
W+
Option 2
A
Option 3
W
Option 4
A+
Q No.9 of 10

Which of the following method is suitable when you need to send larger form submissions?
Option 1
GET
Option 2
POST
Option 3
Bothe of these
Option 4
none of these, other ways is used
Q No.10 of 10

Which of the following method sends input to a script via a URL
Option 1
POST
Option 2
GET
Option 3
Both of these
Option 4
Non of these

Correct Answers