ยินดีต้อนรับคุณ, บุคคลทั่วไป กรุณา เข้าสู่ระบบ หรือ ลงทะเบียน

เข้าสู่ระบบด้วยชื่อผู้ใช้ รหัสผ่าน และระยะเวลาในเซสชั่น

ThaiSEOBoard.comHost and DomainHost & Domain (general)มีปัญหาการใช้ PHP ใครเคยใช้โฮส Pair.com ช่วยด้วยครับ
หน้า: [1]   ลงล่าง
พิมพ์
ผู้เขียน หัวข้อ: มีปัญหาการใช้ PHP ใครเคยใช้โฮส Pair.com ช่วยด้วยครับ  (อ่าน 1015 ครั้ง)
0 สมาชิก และ 1 บุคคลทั่วไป กำลังดูหัวข้อนี้
pickme
Verified Seller
หัวหน้าแก๊งเสียว
*

พลังน้ำใจ: 38
ออฟไลน์ ออฟไลน์

กระทู้: 1,372



ดูรายละเอียด
« เมื่อ: 28 ธันวาคม 2008, 15:39:07 »

รบกวนสอบถามคนที่เคยใช้โฮส Pair.com หรือคนที่รู้วิธีแก้ไขด้วยครับ คือว่า ผมจะทำเว็บเกี่ยบกับจองโรงแรม (ของ r24) กะว่าจะใช้ code php ที่เค้าให้มา (ด้านล่างนี้) เพื่อแสดงรายชื่อโรงแรมที่หน้าเว็บของผม

โค๊ด:
<?php
$partner 
"abc.com"# replace PARTNER by your R24-registered domain name.
$cur $_REQUEST[&#39;cur&#39;]; if (!$cur) $cur = "USD"; # optional. if you want a DEFAULT currency other than THB
$rset $_REQUEST[&#39;rset&#39;]; if (!$rset) $rset = "bangkok"; # replace "bangkok" by whatever region you want to call initially
# don&#39;t change remaining code below this line
$thispage "V4&rf4=".$_SERVER[&#39;HTTP_HOST&#39;].$_SERVER[&#39;PHP_SELF&#39;]."&ip=".$_SERVER[&#39;REMOTE_ADDR&#39;]."&rset=".$rset;
$thelink "http://www.R24.org/".$partner."/".$rset."/CALLER/CUR=".$cur."|SORT=".$_REQUEST[&#39;sort&#39;]."|FRAME=_blank|CALL=".$thispage; 
echo file_get_contents ($thelink);
?>

แต่ปรากฎว่า พอใส่ code ด้านบนนี้ ไว้ในหน้าเว็บเพจ เอาไฟล์ขึ้นโฮสของ pair.com เรียบร้อยแล้ว ... รองเปิดหน้าเว็บ www.abc.com/bangkok/index.php มันขึ้นข้อความว่า

โค๊ด:
Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /usr/www/users/intharar/abc/bangkok/index.php on line 23

Warning: file_get_contents(http://www.R24.org/abc.com/bangkok/CALLER/CUR=USD|SORT=|FRAME=_blank|CALL=V4&rf4=www.abc.com/bangkok/index.php&ip=119.31.76.30&rset=bangkok) [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in /usr/www/users/intharar/abc/bangkok/index.php on line 23

ผมพึ่งสมัครใช้โฮส Pair.com (plan : Advance) อ่ะครับ ... ไม่รู้ว่าต้องเซตค่าอะไรในระบบด้วยรึป่าว?? ใครที่เคยใช้โฮสของที่นี่ หรือคนที่รู้วิธีแก้ไข ช่วยแนะนำด้วยนะครับ ขอแบบละเอียดๆเลยยิ่งดี

ขอบคุณมากครับ
บันทึกการเข้า
pickme
Verified Seller
หัวหน้าแก๊งเสียว
*

พลังน้ำใจ: 38
ออฟไลน์ ออฟไลน์

กระทู้: 1,372



ดูรายละเอียด
« ตอบ #1 เมื่อ: 29 ธันวาคม 2008, 07:52:58 »

ถามไปที่ฝ่าย support ของ pair.com แล้ว ... เค้าตอบกลับมาแบบนี้อ่ะครับ


This is because "fopen", a function within PHP, is disabled for security
reasons on our server. You can either choose to run PHP as a CGI and edit
your own php.ini file, or you can edit a .htaccess file to include the
following line:

php_flag allow_url_fopen on

Please let us know if we can be of further assistance.


สรุปว่าผมต้องทำยังงัยบ้างอ่ะครับ ภาษาอังกฤษไม่แข็งแรง php ก็ไม่รู้เรื่องเลย
รบกวนช่วยอธิบาย แล้วก็บอกวิธีแก้ไขมาเป็นขั้นตอนแบบละเอียดๆด้วยนะครับ

ขอบคุณมากๆครับ
บันทึกการเข้า
tung101
Newbie
*

พลังน้ำใจ: 0
ออฟไลน์ ออฟไลน์

กระทู้: 10



ดูรายละเอียด
« ตอบ #2 เมื่อ: 29 ธันวาคม 2008, 11:32:10 »

สร้างไฟล์ .htaccess ครับแล้วใส่คำสั่งนี้ลงไป

php_flag allow_url_fopen on

ก็สามารถใช้งานได้แล้วครับลองดู
บันทึกการเข้า
หน้า: [1]   ขึ้นบน
พิมพ์