EditPlus

์ˆ˜์ •ยท2024๋…„ 4์›” 20์ผ
0

๋ฆฌ๋ˆ…์Šค

๋ชฉ๋ก ๋ณด๊ธฐ
21/23

๐Ÿ“Œ EditPlus๋กœ php ํŽ˜์ด์ง€ ๋งŒ๋“ค๊ธฐ

1. nginx๋ž‘ ์—ฐ๋™ํ•˜๋Š” ์Šคํฌ๋ฆฝํŠธ ์ž‘์„ฑ์šฉ ํŒŒ์ผ ์ƒ์„ฑ : sudo vim /etc/nginx/conf.d/php_vhost.conf.include

2. ๋‚ด์šฉ ์ถ”๊ฐ€

index index.php index.html index.htm;
root $documentRoot;

location ~ \.php$ {
    root $documentRoot;
    fastcgi_pass 127.0.0.1:9000;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $documentRoot/$fastcgi_script_name;
    include /etc/nginx/fastcgi_params;
    fastcgi_read_timeout 600;
}

3. nginx๋ž‘ ์—ฐ๋™ํ•˜๋Š” ์„œ๋ฒ„ ๋“ฑ๋ก์šฉ ์„ค์ •ํŒŒ์ผ ์ƒ์„ฑ
:
sudo vim /etc/nginx/conf.d/vhost.conf

4. ๋‚ด์šฉ ์ถ”๊ฐ€

server {
    listen 8011;
    server_name _;

    set $documentRoot /web/site1/public;

    location / {
        try_files $uri $uri/ /index.php?$args;
    }

    include /etc/nginx/conf.d/php_vhost.conf.include;
}
server {
    listen 8012;
    server_name _;

    set $documentRoot /web/site1/public;

    location / {
        try_files $uri $uri/ /index.php?$args;
    }

    include /etc/nginx/conf.d/php_vhost.conf.include;
}
.
.
.

5. nginx ์žฌ์‹œ์ž‘ : sudo systemctl restart nginx

6. editPlus ๋‹ค์šด

7. ์—๋””ํŠธ ํ”Œ๋Ÿฌ์Šค ์ ‘์† > ํŒŒ์ผ > FTP > FTP ์„ค์ •

8. ์ถ”๊ฐ€ > ์ •๋ณด ์ž…๋ ฅ > ํ™•์ธ

9. ์—ฐ๊ฒฐํ•œ ๊ณ„์ • ์„ ํƒ

10. public > ๊ธฐ์กด ํŒŒ์ผ ์‚ญ์ œ > gugudan.php ์ƒ์„ฑ > ๋‚ด์šฉ ์ถ”๊ฐ€

<?php
$dan = intval($_GET['dan']);
$limit = intval($_GET['limit']);
?>
<h1>== <?=$dan?>๋‹จ ==</h1>

<?php for ( $i = 1; $i <= $limit; $i++ ) { ?>
<div><?=$dan?> * <?=$i?> = <?=$dan * $i?></div>
<?php } ?>

11. ์‚ฌ์ดํŠธ ํ™•์ธ : 192.168.56.101:ํฌํŠธ_๋ฒˆํ˜ธ/gugudan.php?dan=์ž„์˜์ˆซ์ž&limit=์ž„์˜์ˆซ์ž

  • ip ๋ฒˆํ˜ธ๋Š” ๋‹ค๋ฅผ ์ˆ˜ ์žˆ์Œ

0๊ฐœ์˜ ๋Œ“๊ธ€

๊ด€๋ จ ์ฑ„์šฉ ์ •๋ณด