달력

5

« 2024/5 »

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
2016. 4. 2. 09:13

기본 문법 (Basic Syntax) 프로그래밍/PHP2016. 4. 2. 09:13

1. PHP 태그들 (PHP Tags)


● <?php  ?>


● 짧은 태그 허용 : <?  ?>   

    (비추천, php.ini 에서 short_open_tag 를 허용 또는 --enable-short-tags 옵션이 설정되어 있을 때만 가능하기 때문)


● 파일이 순수 PHP 코드로만 구성되어 있다면 PHP 닫는 태그를 뺄 것을 추천

    (PHP 닫는 태그 ?> 뒤에 공백이나 새줄로 인한 잘못된 결과가 나올 수 있기 때문)


<?php
echo "Hello world";

// ... more code

echo "Last statement";

// PHP 닫는 태그 없이 끝이 난다.

※ 여는 태그 <?php 뒤에는 공백류을 하나 두어야 작동된다.
    공백류: 탭(\t), 뉴라인(\n), 캐리지 리턴(\r), 스페이스 문자(\s)

1. 
<?php/*blah*/ echo "a"?>    // 작동 안됨

2. 
<?php /*php 뒤에 공백 추가*/ echo "a"?>     // 작동 됨

3. 
<?php
/*php 뒤에 뉴라인 추가*/ echo "a"?>    // 작동 됨

4. 
<?php    /*php 뒤에 탭 추가*/ echo "a"?>    // 작동 됨



2. HTML 로부터 탈출 (Escaping from HTML)


● PHP 의 여는 태그와 닫는 태그 이외의 모든 것은 PHP 파서에 의해 무시된다.

<p>PHP에 의해 무시되고 브라우저에 의해 표시된다.</p>
<?php echo 'PHP에 의해 분석된다.'; ?>
<p>PHP에 의해 무시되고 브라우저에 의해 표시된다.</p>



● 조건문을 사용한 고급 탈출


    ○ 조건문이 충족되지 않는 조건 블럭은 스킵된다.


    ○ 큰 텍스트 블럭을 출력할 때 echo 나 print 를 통해서 출력하는 것보다 이 방법이 더 효율적이다.


<?php if ($expression == true): ?>

  식이 true 면 표시된다.

<?php else: ?>

  아니라면 표시된다.

<?php endif; ?>




● PHP 5 에서 여는 태그와 닫는 태그가 5개까지 존재한다. PHP 설정에 따라 다르다.


1. <?php ?>

2. <script language="php"> </script>

3. 짧은 echo 태그 (PHP 5.4.0 이상에서 가능) : <?= ?>

4. 짧은 태그 : <? ?>

5. ASP 스타일 태그 : <% %>


  # 4, 5번 방식은 추천하지 않는 방식이다. 

  # PHP 7에서 2번과 5번 방식은 제거되었다.

  # 1번 <?php ?>, 3번 짧은 echo 태그만 호환성을 위해서 추천한다.

  # 3번 짧은 echo 태그는 php.ini 의 short_open_tag 설정과 상관없이 항상 인식된다.



● 여는 태그와 닫는 태그 예제


1.  <?php echo 'XHTML 이나 XML 문서에서 PHP 코드를 사용하고 싶다면 이런 태그들을 사용하라.'; ?>


2.  짧은 echo 태그 사용 : <?= '이 문장 출력' ?>.

    PHP 5.4.0 이후 버전에서 항상 사용 가능하고 <?php echo '이 문장 출력' ?> 과 같다.


3.  <? echo '이 코드는 짧은 태그 안에 있다, 하지만 short_open_tag 가 설정되어 있을 때 가능'; ?>


4.  <script language="php">

        echo '어떤 에디터들은 (예를 들면 프론트페이지)

              이러한 태그 안에 있는 명령어 처리를 좋아하지 않는다.';

    </script>

    이 문법은 PHP 7 에서 제거되었다.


5.  <% echo 'ASP 스타일 태그도 사용 가능하다.'; %>

    <%= $variable; %> 는 <% echo $variable; %> 의 축약 표현으로 같다.

    이 문법은 PHP 7 에서 제거되었다.


http://php.net/manual/en/language.basic-syntax.phpmode.php

:
Posted by 지훈2
2016. 1. 26. 01:44

Regarding The Mighty No. 9 Release 영어/스크랩2016. 1. 26. 01:44

Regarding The Mighty No. 9 Release

To the fans eagerly awaiting the release of Mighty No. 9,  

Unfortunately, we have an announcement that will be very disappointing to all of you. In preparation for the February release of Mighty No. 9 we have been working hard with our partners to resolve any network issues and porting work necessary to publish Mighty No. 9 on the various platforms. However, the issues relating to the network modes were more critical than expected, and it has become apparent that we will need to delay the game from its February 9th release date. We have been working up until the very last moment to resolve these issues in order to make the February release, but it has become clear that we no longer have enough time to fix the issues and have everything prepared for release.

The reason for the delay is rooted in bugs inside the network modes, and specifically problems with matchmaking. There are two large reasons for this problem, one of them being the large number of platforms supported (the solution for each platform is slightly different) and the other stems from the fact that the engine we are using is no longer being updated which means adjustments for matchmaking and online code are being made manually (actually reprogramming parts of the engine by the dev team themselves). Unfortunately, this is all a result of miscalculations on the part of us, the development staff. As a result, our fans who have been looking forward to Mighty No. 9 have been forced to wait for over half a year longer than expected, and for that we are sincerely sorry. I want to take this chance to apologize personally, and on the behalf of the development staff.

Over the end of the year break and the beginning of 2016, the development staff has been working on these issues non-stop without break, and thanks to their hard work the end is in sight. We continue to make progress to resolve these last issues that have been holding up the release of the game on the different platforms.

Because we are constantly working on it in cooperation with all our partners, we want to wait and make sure that everything is confirmed to be ready before giving a new specific release date. But we expect it to realistically be in Spring 2016.

For this 3rd delay of the game, we have no excuses for disappointing our fans and especially our backers once more. We want to take this chance to express our sincerest apologies to everyone who has looked forward to the release.

Although we are far past our original release date, the release of Mighty No. 9 is still right around the corner. We are all working hard to make sure that we can finish and release the game to all of our fans as quickly as possible, and ask once more for your support of this project that we have created together over these last few years.

Keiji Inafune


  1. Regarding : prep. 관하여 
  2. eager : adj. 열렬한, 간절히 바라는, 열망하는 (for sth, to do sth)
  3. relating to : ~에 관하여
  4. critical : 비판적인, 대단히 중요한, 매우 심각한, 중대한, extremely important, very serious
  5. apparent : (명사 앞에 안씀) 분명한, (주로 명사 앞) ~인 것처럼 보이는 cf. clear / obvious / apparent / evident / plain / crystal clear
  6. work up 노력하다, 작업하다, to spend time and effort on a piece of work in order to improve or complete it


http://www.mightyno9.com/en/20150125

https://www.kickstarter.com/projects/mightyno9/mighty-no-9/posts/1473777



:
Posted by 지훈2