열심히 노력하고 있지만 할 수 없습니다. 모든 PHP 전문가가 지식을 공유합니다 ... (필자는 페이스 북이 PHP를 사용하여 빌드 된 방법에 대해 궁금합니다. 이 간단한 일이 : 나쁜 정말 나쁜)php (특정 줄)을 사용하여 텍스트 파일을 읽습니다.
내가 텍스트 파일 아래에있는 (하시면 sample.txt) 할 수
<Module>
title = "this is title" thumb ="http://www.example.com/thumb.jpg"
description ="this is the description of the title"
screen ="http://www.example.com/screen.jpg"
<Content type="html" view="canvas">
<![CDATA[
<div>Hello world Canvas view</div>
<script type="text/javascript">
function goToView(dest) {
var supported_views = gadgets.views.getSupportedViews();
gadgets.views.requestNavigateTo(supported_views[dest]);
};
</script>
<a href="javascript:goToView('home')" >Go to home view</a><br><br>
]]>
</Content>
</Module>
지금은 PHP를 사용하여 위의 Sample.txt 파일을 읽고 그것을 표시 할 또는 그것을 데이터베이스에 저장하십시오.
여기
this is title - should go in $title variable
http://www.example.com/thumb.jpg - should go in $thumb variable
i just want only these four variables (title, thumb, description & screen)
것은 모든 상기 네 개의 변수 (제목, 엄지 설명 & 화면)이 다른 행 또는 동일 선상에있을 수의 Sample.txt이다. 당신이 INI 파일에 변수를 저장하는 경우
는 전문가
무엇을 시도 했습니까? – Sanjay