Interview Questions

Q:

What is the difference between using copy() and move() function in php file uploading?

Answer

Copy() makes a copy of the file. It returns TRUE on success. It can copy from any source to destination. Move simply Moves the file to destination if the file is valid. While move can move the uploaded file from temp server location to any destination on the server. If filename is a valid upload file, but cannot be moved for some reason, no action will occur.

Report Error

View answer Workspace Report Error Discuss

Subject: PHP

0 2483
Q:

What are different ABAP/4 editors? What are the differences?

Answer

The 2 editors are se38 and se80 both have the abap editor in place. In se38 you can go create programs and view online reports and basically do all thedevelopmet of objects in this editor. In se80 ( object navigator) there are additional features such as creating packages,module pool , function group ,classes, programs ( where you can create ur programs) and BSP applications .

Report Error

View answer Workspace Report Error Discuss

Subject: SAP

0 2481
Q:

Explain how to store the uploaded file to the final location.

Answer

A HTML form should be build before uploading the file. The following HTML code is used for selecting the file that is to be uploaded. The type attribute of input must be “file”.


<form enctype="multipart/form-data" action="uploader.php" method="POST">


<input type="hidden" name="MAX_FILE_SIZE" value="100000" />


Choose a file to upload: <input name="uploadedfile" type="file" /><br />


<input type="submit" value="Upload File" />


</form>


At the time of executing uploader.php, the uploaded file will be stored in a temporary storage are on the webserver. An associative array $_FILES['uploadedfile']['name'] is used for uploading. The ‘name’ is the original file that is to be uploaded. Another associative array $_FILES['uploadedfile']['tmp_name'] is used for placing the uploaded file in a temporary location on the server and the file should be empty and should exist with the tmp_name.


The following code snippet is used for uploading the file.


$target_path = "uploads/"; // the target location of the file


$target_path = $target_path . basename( $_FILES['uploadedfile']['name']);


if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) 


{


       echo "The file ". basename( $_FILES['uploadedfile']['name']). 


        " has been uploaded";


}


else


{


      echo “There was an error while uploading the file”;


}


The function move_uploaded_file()is used to place the source file into the destination folder, which resides on the server.


If the uploading is successful, the message “The file filename has been uploaded. Otherwise the error message “There was an error while uploading the file” would be displayed.

Report Error

View answer Workspace Report Error Discuss

Subject: PHP

0 2481
Q:

Explain the difference among the EXEC LINK, EXEC XCTL and Cobol II static call statements in CICS?

Answer

- Use a COBOL II CALL statement to invoke a subprogram. This method is transparent to CICS, which sees only the one load module. 


- EXEC LINK is similar to a call; it invokes a separate CICS program and ends with a RETURN to the invoking program


- EXEC XCTL which transfers control to another CICS program and does not get control 


back. 


COBOL II allows for static calls which are more efficient than the LINK instruction which establishes a new run-unit. 

Report Error

View answer Workspace Report Error Discuss

0 2480
Q:

What is Overloading Polymorphism?

Answer

Overloading allows multiple functions to exist with same name but different parameters. Again if you take bike as an example, it has a function “Start” with two forms i.e. ’Auto Start’ and ’kick start’.

Report Error

View answer Workspace Report Error Discuss

Subject: Java

0 2480
Q:

What is a DB2 plan?

Answer

An application plan or package is generated by the bind to define an access path. 

Report Error

View answer Workspace Report Error Discuss

0 2479
Q:

Oracle Server supports two different forms of replication: Basic and Advanced replication. Explain difference between these.

Answer

Basic Replication : Basic replication is implemented using standard CREATE SNAPSHOT or CREATE MATERIALIZED VIEW statements. It can only replicate data and not procedures, indexes replication is always one-way, and snapshot copies are read only.


Advanced Replication : Advanced replication supports various configurations of updatable snapshot, multi-master and update anywhere replication. It is more difficult to configure but allows data and other database objects like indexes and procedures to be replicated.


 


Differences between Basic and Advanced replications:


- With basic replication, data replicas provide read-only access to the table data whereas advanced replication features extend the capabilities of basic read-only replication by allowing applications to update table replicas throughout a replicated database system.


- With Basic Replication applications can query data from local data replicas. On the other hand with advanced replication, data replicas anywhere in the system can provide both read and update access to a table's data.

Report Error

View answer Workspace Report Error Discuss

Subject: Oracle

0 2478
Q:

What is a Session?

Answer

A session is a logical object created by the PHP engine to allow you to preserve data across subsequent HTTP requests. Sessions are commonly used to store temporary data to allow multiple PHP pages to offer a complete functional transaction for the same visitor.

Report Error

View answer Workspace Report Error Discuss

Subject: PHP

0 2477