<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>live_ly</author_name>
  <author_url>https://blog.hatena.ne.jp/live_ly/</author_url>
  <blog_title>PHP SCHOOL.biz</blog_title>
  <blog_url>https://progra.hatenadiary.jp/</blog_url>
  <categories>
    <anon>PHPでのファイルの作成・書き込み</anon>
  </categories>
  <description>この章では、サーバー上でファイルを作成して書き込む方法を説明します。 PHPファイルの作成 - fopen() fopen()関数は、ファイルの作成にも使用されます。少し混乱するかもしれませんが、PHPでは、ファイルを開くために使用されたのと同じ関数を使用してファイルが作成されます。 存在しないファイルに対してfopen()を使用すると、ファイルが書き込み（w）または追加（a）のために開かれ、作成されます。 以下の例は、 &quot;testfile.txt&quot;という名前の新しいファイルを作成します。このファイルは、PHPコードが置かれているのと同じディレクトリに作成されます。例 &lt;?php $myfil…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fprogra.hatenadiary.jp%2Fentry%2Ffilecreate&quot; title=&quot;PHPでのファイルの作成・書き込み - PHP SCHOOL.biz&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2018-01-21 00:00:00</published>
  <title>PHPでのファイルの作成・書き込み</title>
  <type>rich</type>
  <url>https://progra.hatenadiary.jp/entry/filecreate</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
