Mac은 MAMP를 개발 환경으로 사용합니다. laravel 페이지를 찾을 수 없습니다.
이 학습문서를 참고하여 라라벨을 배웠습니다
Ubuntu에서 코드를 입력했습니다. ID가 있는 링크는 localhost/articles/id에 대한 일반적인 액세스이며 데이터베이스의 내용을 표시합니다. 그러나 Mac에서 mamp 환경 URL에 매개변수를 사용하여 액세스하면 페이지가 표시되지 않습니다. 발견이 나타나는 이유를 모르겠습니다.
<code>@section('content') <article class="format-image group"> <h2 class="post-title pad"> <a href="/articles/{{ $article->id }}" rel="bookmark"> {{ $article->title }}</a> > *这个A标签里面带的id* </h2> <div class="post-inner"> <div class="post-content pad"> <div class="entry custome"> {{ $article->content }} </div> </div> </div> </article> @endsection</code>
MAMP에서 nginx.conf를 수정해야 할 것 같은데 이유를 모르겠습니다
<code>user root admin; worker_processes 2; events { worker_connections 1024; } http { include mime.types; default_type text/html; gzip on; gzip_types text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon; sendfile on; server { listen 80 default_server; # MAMP DOCUMENT_ROOT !! Don't remove this line !! root "/Applications/MAMP/htdocs/laravel/public"; access_log /Applications/MAMP/logs/nginx_access.log; error_log /Applications/MAMP/logs/nginx_error.log debug; location / { index index.html index.php; } location ~* /MAMP/(.*)$ { root /Applications/MAMP/bin; index index.php; location ~ \.php$ { try_files $uri =404; fastcgi_pass unix:/Applications/MAMP/Library/logs/fastcgi/nginxFastCGI.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } } location ~* /phpMyAdmin(.*)$ { root /Applications/MAMP/bin; index index.php; location ~ \.php$ { try_files $uri =404; fastcgi_pass unix:/Applications/MAMP/Library/logs/fastcgi/nginxFastCGI.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } } location ~* /phpPgAdmin(.*)$ { root /Applications/MAMP/bin; index index.php; location ~ \.php$ { try_files $uri =404; fastcgi_pass unix:/Applications/MAMP/Library/logs/fastcgi/nginxFastCGI.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } } location ~* /phpLiteAdmin(.*)$ { root /Applications/MAMP/bin; index index.php; location ~ \.php$ { try_files $uri =404; fastcgi_pass unix:/Applications/MAMP/Library/logs/fastcgi/nginxFastCGI.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } } location ~* /SQLiteManager(.*)$ { root /Applications/MAMP/bin; index index.php; location ~ \.php$ { try_files $uri =404; fastcgi_pass unix:/Applications/MAMP/Library/logs/fastcgi/nginxFastCGI.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } } location /icons { alias /Applications/MAMP/Library/icons; autoindex on; } location /favicon.ico { alias /Applications/MAMP/bin/favicon.ico; # log_not_found off; # access_log off; } location ~ \.php$ { try_files $uri =404; fastcgi_pass unix:/Applications/MAMP/Library/logs/fastcgi/nginxFastCGI.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } location ~ /\. { deny all; } # location ~* \.(gif|jpg|png|pdf)$ { # expires 30d; # } # location = /robots.txt { # allow all; # log_not_found off; # access_log off; # } # location ~* \.(txt|log)$ { # allow 127.0.0.1; # deny all; # } # location ~ \..*/.*\.php$ { # return 403; # } location /nginx_status { stub_status on; access_log off; allow 127.0.0.1; deny all; } } # HTTPS server # #server { # listen 443 ssl; # server_name localhost; # ssl_certificate cert.pem; # ssl_certificate_key cert.key; # ssl_session_cache shared:SSL:1m; # ssl_session_timeout 5m; # ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # ssl_ciphers HIGH:!aNULL:!MD5; # ssl_prefer_server_ciphers on; # location / { # root html; # index index.html index.htm; # } #} }</code>
이런 문제를 겪은 전문가가 있나요? ? ?
답글 내용:
이 학습문서를 참고하여 라라벨을 배웠습니다
Ubuntu에서 코드를 입력했습니다. ID가 있는 링크는 localhost/articles/id에 대한 일반적인 액세스이며 데이터베이스의 내용을 표시합니다. 그러나 Mac에서 mamp 환경 URL에 매개변수를 사용하여 액세스하면 페이지가 표시되지 않습니다. 발견이 나타나는 이유를 모르겠습니다.
<code>@section('content') <article class="format-image group"> <h2 class="post-title pad"> <a href="/articles/{{ $article->id }}" rel="bookmark"> {{ $article->title }}</a> > *这个A标签里面带的id* </h2> <div class="post-inner"> <div class="post-content pad"> <div class="entry custome"> {{ $article->content }} </div> </div> </div> </article> @endsection</code>
MAMP에서 nginx.conf를 수정해야 할 것 같은데 이유를 모르겠습니다
<code>user root admin; worker_processes 2; events { worker_connections 1024; } http { include mime.types; default_type text/html; gzip on; gzip_types text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon; sendfile on; server { listen 80 default_server; # MAMP DOCUMENT_ROOT !! Don't remove this line !! root "/Applications/MAMP/htdocs/laravel/public"; access_log /Applications/MAMP/logs/nginx_access.log; error_log /Applications/MAMP/logs/nginx_error.log debug; location / { index index.html index.php; } location ~* /MAMP/(.*)$ { root /Applications/MAMP/bin; index index.php; location ~ \.php$ { try_files $uri =404; fastcgi_pass unix:/Applications/MAMP/Library/logs/fastcgi/nginxFastCGI.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } } location ~* /phpMyAdmin(.*)$ { root /Applications/MAMP/bin; index index.php; location ~ \.php$ { try_files $uri =404; fastcgi_pass unix:/Applications/MAMP/Library/logs/fastcgi/nginxFastCGI.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } } location ~* /phpPgAdmin(.*)$ { root /Applications/MAMP/bin; index index.php; location ~ \.php$ { try_files $uri =404; fastcgi_pass unix:/Applications/MAMP/Library/logs/fastcgi/nginxFastCGI.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } } location ~* /phpLiteAdmin(.*)$ { root /Applications/MAMP/bin; index index.php; location ~ \.php$ { try_files $uri =404; fastcgi_pass unix:/Applications/MAMP/Library/logs/fastcgi/nginxFastCGI.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } } location ~* /SQLiteManager(.*)$ { root /Applications/MAMP/bin; index index.php; location ~ \.php$ { try_files $uri =404; fastcgi_pass unix:/Applications/MAMP/Library/logs/fastcgi/nginxFastCGI.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } } location /icons { alias /Applications/MAMP/Library/icons; autoindex on; } location /favicon.ico { alias /Applications/MAMP/bin/favicon.ico; # log_not_found off; # access_log off; } location ~ \.php$ { try_files $uri =404; fastcgi_pass unix:/Applications/MAMP/Library/logs/fastcgi/nginxFastCGI.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } location ~ /\. { deny all; } # location ~* \.(gif|jpg|png|pdf)$ { # expires 30d; # } # location = /robots.txt { # allow all; # log_not_found off; # access_log off; # } # location ~* \.(txt|log)$ { # allow 127.0.0.1; # deny all; # } # location ~ \..*/.*\.php$ { # return 403; # } location /nginx_status { stub_status on; access_log off; allow 127.0.0.1; deny all; } } # HTTPS server # #server { # listen 443 ssl; # server_name localhost; # ssl_certificate cert.pem; # ssl_certificate_key cert.key; # ssl_session_cache shared:SSL:1m; # ssl_session_timeout 5m; # ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # ssl_ciphers HIGH:!aNULL:!MD5; # ssl_prefer_server_ciphers on; # location / { # root html; # index index.html index.htm; # } #} }</code>
이런 문제를 겪은 전문가가 있나요? ? ?
제가 이해한 바에 따르면 nginx가 php에 액세스하려면 php-fpm을 거쳐야 합니다....

핫 AI 도구

Undresser.AI Undress
사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover
사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool
무료로 이미지를 벗다

Clothoff.io
AI 옷 제거제

AI Hentai Generator
AI Hentai를 무료로 생성하십시오.

인기 기사

뜨거운 도구

메모장++7.3.1
사용하기 쉬운 무료 코드 편집기

SublimeText3 중국어 버전
중국어 버전, 사용하기 매우 쉽습니다.

스튜디오 13.0.1 보내기
강력한 PHP 통합 개발 환경

드림위버 CS6
시각적 웹 개발 도구

SublimeText3 Mac 버전
신 수준의 코드 편집 소프트웨어(SublimeText3)

뜨거운 주제











Laraveleloquent 모델 검색 : 데이터베이스 데이터를 쉽게 얻을 수 있습니다. 이 기사는 데이터베이스에서 데이터를 효율적으로 얻는 데 도움이되는 다양한 웅변 모델 검색 기술을 자세히 소개합니다. 1. 모든 기록을 얻으십시오. 모든 () 메소드를 사용하여 데이터베이스 테이블에서 모든 레코드를 가져옵니다. 이것은 컬렉션을 반환합니다. Foreach 루프 또는 기타 수집 방법을 사용하여 데이터에 액세스 할 수 있습니다 : Foreach ($ postas $ post) {echo $ post->

PHP의 미래는 새로운 기술 트렌드에 적응하고 혁신적인 기능을 도입함으로써 달성 될 것입니다. 1) 클라우드 컴퓨팅, 컨테이너화 및 마이크로 서비스 아키텍처에 적응, Docker 및 Kubernetes 지원; 2) 성능 및 데이터 처리 효율을 향상시키기 위해 JIT 컴파일러 및 열거 유형을 도입합니다. 3) 지속적으로 성능을 최적화하고 모범 사례를 홍보합니다.

PHP와 Python은 각각 고유 한 장점이 있으며 선택은 프로젝트 요구 사항을 기반으로해야합니다. 1.PHP는 간단한 구문과 높은 실행 효율로 웹 개발에 적합합니다. 2. Python은 간결한 구문 및 풍부한 라이브러리를 갖춘 데이터 과학 및 기계 학습에 적합합니다.

7 백만 레코드를 효율적으로 처리하고 지리 공간 기술로 대화식지도를 만듭니다. 이 기사는 Laravel과 MySQL을 사용하여 7 백만 개 이상의 레코드를 효율적으로 처리하고 대화식지도 시각화로 변환하는 방법을 살펴 봅니다. 초기 챌린지 프로젝트 요구 사항 : MySQL 데이터베이스에서 7 백만 레코드를 사용하여 귀중한 통찰력을 추출합니다. 많은 사람들이 먼저 프로그래밍 언어를 고려하지만 데이터베이스 자체를 무시합니다. 요구 사항을 충족시킬 수 있습니까? 데이터 마이그레이션 또는 구조 조정이 필요합니까? MySQL이 큰 데이터로드를 견딜 수 있습니까? 예비 분석 : 주요 필터 및 속성을 식별해야합니다. 분석 후, 몇 가지 속성만이 솔루션과 관련이 있음이 밝혀졌습니다. 필터의 타당성을 확인하고 검색을 최적화하기위한 제한 사항을 설정했습니다. 도시를 기반으로 한지도 검색

PHP와 Python은 각각 고유 한 장점이 있으며 프로젝트 요구 사항에 따라 선택합니다. 1.PHP는 웹 개발, 특히 웹 사이트의 빠른 개발 및 유지 보수에 적합합니다. 2. Python은 간결한 구문을 가진 데이터 과학, 기계 학습 및 인공 지능에 적합하며 초보자에게 적합합니다.

PHP는 현대 웹 개발, 특히 컨텐츠 관리 및 전자 상거래 플랫폼에서 중요합니다. 1) PHP는 Laravel 및 Symfony와 같은 풍부한 생태계와 강력한 프레임 워크 지원을 가지고 있습니다. 2) Opcache 및 Nginx를 통해 성능 최적화를 달성 할 수 있습니다. 3) PHP8.0은 성능을 향상시키기 위해 JIT 컴파일러를 소개합니다. 4) 클라우드 네이티브 애플리케이션은 Docker 및 Kubernetes를 통해 배포되어 유연성과 확장 성을 향상시킵니다.

Laravel은 백엔드 논리에서 어떻게 중요한 역할을합니까? 라우팅 시스템, eloquentorm, 인증 및 승인, 이벤트 및 청취자, 성능 최적화를 통해 백엔드 개발을 단순화하고 향상시킵니다. 1. 라우팅 시스템은 URL 구조의 정의 및 요청 처리 로직을 정의 할 수 있습니다. 2. eloquentorm은 데이터베이스 상호 작용을 단순화합니다. 3. 인증 및 인증 시스템은 사용자 관리에 편리합니다. 4. 이벤트와 리스너는 느슨하게 결합 된 코드 구조를 구현합니다. 5. 성능 최적화는 캐싱 및 대기열을 통한 응용 프로그램 효율성을 향상시킵니다.

PHP가 많은 웹 사이트에서 선호되는 기술 스택 인 이유에는 사용 편의성, 강력한 커뮤니티 지원 및 광범위한 사용이 포함됩니다. 1) 배우고 사용하기 쉽고 초보자에게 적합합니다. 2) 거대한 개발자 커뮤니티와 풍부한 자원이 있습니다. 3) WordPress, Drupal 및 기타 플랫폼에서 널리 사용됩니다. 4) 웹 서버와 밀접하게 통합하여 개발 배포를 단순화합니다.
