สอบถาม php ข้อมูลไม่แสดง

พูดคุย phpBB3, SMF ปัญหา การติดตั้ง ปัญหา การลง Mod การแก้ไข หน้าตาบอร์ด การใช้งาน Joomla 1.5, 1.6, 1.7, 2.5 ,3.x รวมถึง Joomla 4 การใช้งาน wordpress และ CMS อื่นๆ
การตั้งคำถาม ควรระบุรุ่นที่ใช้ ในการตั้งคำตามด้วย นะ เช่น SMF 1.1.4 หรือ SMF2.0, OpenERP, Odoo และ รายละเอียดของ server OS, php เวอร์ชั่นไหน ฐานข้อมูลอะไร

Moderator: mindphp

กฎการใช้บอร์ด
คำถามหมวดนี้ ควรระบุ รายละเอียดของ Server OS, เวอร์ชั่น ของ PHP, CMS ที่ท่านใช้
รวมถึง Hosting หรือ Control Panel Hosting
AePongsak
PHP VIP Members
PHP VIP Members
โพสต์: 4996
ลงทะเบียนเมื่อ: 17/09/2016 10:09 am

สอบถาม php ข้อมูลไม่แสดง

โพสต์ที่ยังไม่ได้อ่าน โดย AePongsak »

เขียนโปรแกรมโดยใช้ php มีการเรียกข้อมูลจาก xml และใช้งาน js ก่อนหน้านี้ข้อมูลยังแสดงปกติ
ล่าสุดทดสอบ clone โปรเจคลงมาทำใหม่ ปรากฏว่าข้อมูลไม่แสดง
ลองทดสอบ F12 และเช็คที่ Console ดูพบ error หลายจุด

ไม่ทราบว่าเป็นเพราะอะไร และมีวิธีแก้ไขอย่างไรครับ


รูปภาพ

โค้ด: เลือกทั้งหมด

Loading failed for the <script> with source “http://localhost:8081/joomla/tools/js/bootstrap-select.js”.
index.php:36
SyntaxError: expected expression, got ','[Learn More]
index.php:553:69
uncaught exception: InvalidValueError: myMap is not a function
CSI/tbsd_
cb=gapi.loaded_0:259:127
CSI/_tbnd
cb=gapi.loaded_0:259:127
Content Security Policy: Ignoring “'unsafe-inline'” within script-src: ‘strict-dynamic’ specified
Content Security Policy: Ignoring “https:” within script-src: ‘strict-dynamic’ specified
Content Security Policy: Ignoring “http:” within script-src: ‘strict-dynamic’ specified
Content Security Policy: Ignoring “'unsafe-inline'” within script-src: ‘strict-dynamic’ specified
Content Security Policy: Ignoring “https:” within script-src: ‘strict-dynamic’ specified
Content Security Policy: Ignoring “http:” within script-src: ‘strict-dynamic’ specified
Blocked loading mixed active content “http://localhost:8081/joomla/tools/css/fonts/thsarabunnew_italic-webfont.woff”[Learn More]
index.php
Blocked loading mixed active content “http://localhost:8081/joomla/tools/css/fonts/thsarabunnew_bold-webfont.woff”[Learn More]
index.php
Blocked loading mixed active content “http://localhost:8081/joomla/tools/css/fonts/thsarabunnew-webfont.woff”[Learn More]
index.php
Content Security Policy: The page’s settings observed the loading of a resource at self (“script-src”). A CSP report is being sent. Source: onclick attribute on A element.
sharebutton
perf_trace {"name": "e2e", "parent": "PageEvents.BIGPIPE_ONLOAD"}
04i6TYF0z89.js:94:2791
perf_trace {"name": "e2e", "parent": "PageEvents.BIGPIPE_ONLOAD"}
04i6TYF0z89.js:94:2791
รูปภาพ
ξν℮ry story has an end but in life every end is a neω ßeginning.
ภาพประจำตัวสมาชิก
thatsawan
PHP VIP Members
PHP VIP Members
โพสต์: 28508
ลงทะเบียนเมื่อ: 31/03/2014 10:02 am
ติดต่อ:

Re: สอบถาม php ข้อมูลไม่แสดง

โพสต์ที่ยังไม่ได้อ่าน โดย thatsawan »

ขอดู code
เขียนโปรแกรมโดยใช้ php มีการเรียกข้อมูลจาก xml และใช้งาน js ก่อนหน้านี้ข้อมูลยังแสดงปกติ
อาจจะเกิดจาก
http https
AePongsak
PHP VIP Members
PHP VIP Members
โพสต์: 4996
ลงทะเบียนเมื่อ: 17/09/2016 10:09 am

Re: สอบถาม php ข้อมูลไม่แสดง

โพสต์ที่ยังไม่ได้อ่าน โดย AePongsak »

โค้ด: เลือกทั้งหมด

$xml_value = file_get_contents('http://freegeoip.net/xml/' . $ip);

 $result_xml = simplexml_load_string($xml_value);

 $city = $result_xml->City[0];

<tr class="warning">
    td align="right" width="50%">
          <?php echo "<b>เมือง </b>"; ?></td>
    </td>
     <td>
<?php echo $city; ?>
      </td>                             
</tr>
ตัวอย่างที่ไม่แสดง
รูปภาพ
รูปภาพ
ξν℮ry story has an end but in life every end is a neω ßeginning.
ตอบกลับโพส
  • Similar Topics
    ตอบกลับ
    แสดง
    โพสต์ล่าสุด

ผู้ใช้งานขณะนี้

สมาชิกกำลังดูบอร์ดนี้: Amazon [Bot] และบุคลทั่วไป 79