วันจันทร์ที่ 26 ตุลาคม พ.ศ. 2552

[PHP] การเขียนไฟล์

ใช้คำสั่ง fopen นะคร้าบ

$strFileName = "MyFile.txt";
$objFopen = fopen($strFileName, 'w');
$strText = "Test ja";
fwrite($objFopen, $strText1);

if($objFopen)
{
echo "File writed.";
}
else
{
echo "File can not write";
}

fclose($objFopen);

สำหรับ Mode การเขียนก็มี
r - ไว้อ่านอย่างเดียว
w - ถ้ามีไฟล์อยู่แล้วเขียนทับหรือสร้างใหม่
a - เขียนต่อขอรับ

[PHP] การใช้คำสั่ง Imagestring

ใน php.ini ใช้
extension=php_gd2.dll

เอาไว้ทำรูปภาพอ่ะนะ

วันจันทร์ที่ 19 ตุลาคม พ.ศ. 2552

Prevent Web.config inheritance

add <location inheritInChildApplications="false"> to surround setting section your top level web application

ex.

<configuration>

<location path="." inheritInChildApplications="false">

<system.web>

<!-- Your Setting -->

</system.web>

</location>

</configuration>

How to use SSL in your localhost (IIS)

Use makecert.exe in command line for this job.
I will explain how to used later.