When working with the MVC paradigma, the business logic should be implemented in which of the following components?
A. View
B. Controller
C. Model
正解:C
質問 2:
Assume that you are using PHP s session management without cookies and want to make sure that session information does not get lost when redirecting the client to another URL.
Which of the following functions do you need to achieve that? (Choose 3)
A. session_name()
B. header()
C. session_id()
D. session_write_close()
E. session_info()
正解:A,B,C
質問 3:
What XML component does the following XPath query try to match?
//foo[bar/@id=5]
A. foo element with a child note bar whose id attribute is equal to 5
B. foo element containing a child node bar tag
C. id attribute whose value is equal to 5
D. all of the foo elements that have a child node bar, whose id attribute is equal to 5
E. bar element with an id attribute whose value is equal to 5
正解:D
質問 4:
When comparing prepared statements and regular, application-constructed SQL statements, which of the following is true?
A. Prepared statements are always shorter
B. Prepared statements are faster
C. Prepared statements are more secure
D. Prepared statements are easier to develop
E. None of the above
正解:C
質問 5:
The purpose of the singleton pattern is to...
A. ...create applications that only a single user may use.
B. ...have only one instance of each object in a collection of objects.
C. ...have just one single instance of an object in the entire application.
正解:C
質問 6:
What will the following code piece print?
echo strtr('Apples and bananas', 'ae', 'ea')
A. Apples and bananas
B. Applas end bananas
C. Epplas end benenes
D. Applas end benenes
正解:D
質問 7:
Do constants have global scope or local scope?
A. They have neither global nor local scope
B. They have local scope
C. They have global scope
D. They have both global and local scope
正解:B
質問 8:
In a shared hosting environment, session data can be read by PHP scripts written by any user. How can you prevent this?
A. Enable safe_mode.
B. Store session data in a different location with session.save_path
C. Set session.name to something unique.
D. Store session data in a database.
正解:D
質問 9:
What piece of code would you use to obtain an array of response headers for a given URL, indexed by their respective names?
A. stream_context_get_headers($url);
B. get_header($url);
C. get_headers($url, 1);
D. get_headers($url);
E. get_headers($url, ASSOC_HEADERS);
正解:C
市川** -
Pass4Testの200-500問題集は「わかりやすさ」「見やすさ」「網羅性」という加点ポイントがあって受かないわけがないよ。