PHP Questions

Q:

How can we display the output directly to the browser?

Answer

To be able to display the output directly to the browser, we have to use the special tags <?= and ?>.

Report Error

View answer Workspace Report Error Discuss

Subject: PHP - Technology

7 6805
Q:

What is PHP’s configuration file called ?

Answer

PHP’s configuration file is called php.ini.

Report Error

View answer Workspace Report Error Discuss

Subject: PHP - Technology

6 3828
Q:

What’s the difference between htmlentities() and htmlspecialchars()?

Answer

Htmlentities() converts all applicable characters to HTML entities. While htmlspecialcharacter()converts special characters to HTML entities. This means htmlentities( ) will check for non English language characters, such as French accents, the German umlaut, etc.

Report Error

View answer Workspace Report Error Discuss

Subject: PHP - Technology

3 1855
Q:

Why was PHP developed, what it is used for, and where can you get it?

Answer

PHP developed for less script, time saving, Free Open Source Software and runs on different platforms such as Windows, Linux, Unix, etc. PHP compatible with almost all servers used today such as Apache, IIS, etc.

The PHP scripting language resembles JavaScript, Java, and Perl, These languages all share a common ancestor, the C programming language. PHP has full access to the information that the server has, and very little access to information that the client has. In fact, it only has information that the client tells the server and that the server passes on to PHP. Because it is on the server, however, PHP cannot be modified by the client. While you cannot necessarily trust the information that the client gives to PHP, you can trust that your PHP is doing what you told it to do. Because PHP is on the server end, your PHP scripts can affect your server -- such as by keeping an activity log or updating a database.

Report Error

View answer Workspace Report Error Discuss

Subject: PHP - Technology

2 9726
Q:

What is the difference between Notify URL and Return URL?

Answer

Notify URL and Return URL is used in Paypal Payment Gateway integration. Notify URL is used by PayPal to post information about the transaction. Return URL is used by the browser; A url where the user needs to be redirected on completion of the payment process.

Report Error

View answer Workspace Report Error Discuss

Subject: PHP - Technology

2 3566
Q:

What is the purpose $_PHP_SELF variable?

Answer

The PHP default variable $_PHP_SELF is utilized for the PHP script name and when you click "submit" catch then same PHP script will be called.

Report Error

View answer Workspace Report Error Discuss

Subject: PHP - Technology
Job Role: IT Trainer

2 5458
Q:

PHP allows you to send emails directly from a script.

php allows you to send emails directly from a script

A) TRUE B) FALSE
Answer & Explanation Answer: A) TRUE

Explanation:

The mail() function allows you to send emails directly from a script.


 

Report Error

View Answer Workspace Report Error Discuss

2 1914
Q:

With a heredoc syntax, do I get variable substitution inside the heredoc contents?

Answer Yes
Report Error

View answer Workspace Report Error Discuss

Subject: PHP - Technology

1 3169