|
 |
|
Codeigniter Query String ถามปัญหาที่เกิดขึ้นหน่อยใครมีวิธีแก้ไขบ้าง |
|
 |
|
|
 |
 |
|
ผมใช้ Codeigniter บางทีใช้ Plug-in พวก editor ทั้งหลายซึ่งปกติเค้าใช้ GET ส่งค่า เช่นพวก ckeditor ที่เวลาเราเรียกเค้าก็จะมีชุดโค้ดหนึ่งมาให้เราวางซึ่งประมาณนี้ครับ
Code (PHP)
<script type="text/javascript">
//<![CDATA[
CKEDITOR.replace( 'detail',{
language : 'en',
height : 950,
filebrowserBrowseUrl : '<? echo base_url(); ?>assets/js/ckfinder/ckfinder.html',
filebrowserImageBrowseUrl : '<? echo base_url(); ?>assets/js/ckfinder/ckfinder.html?Type=Images',
filebrowserFlashBrowseUrl : '<? echo base_url(); ?>assets/js/ckfinder/ckfinder.html?Type=Flash',
filebrowserUploadUrl : '<? echo base_url(); ?>assets/js/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files',
filebrowserImageUploadUrl : '<? echo base_url(); ?>assets/js/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images',
filebrowserFlashUploadUrl : '<? echo base_url(); ?>assets/js/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash'
} );
//]]>
</script>
จะเห็นว่ามันมี ? ใช้ส่งค่า ทีนี้ผมถ้าผมไปเปิดใช้
$config['enable_query_strings'] = FALSE;
เป็น
$config['enable_query_strings'] = TRUE;
มันก็จะไม่ฟ้อง error ว่าโค้ดผิด **แต่เวลาคลิกลิงค์ มันจะมี ? ติดมาด้วยเสมอทำให้ลิงค์ไม่ได้ ตรงนี้แก้ไขยังไงอ่ะครับ ของผมขึ้นทุกลิงค์เลย งงมาก
ตัวอย่าง
Code
http://192.168.1.50/?web/backend/article
ขึ้นแบบนี้วิธีทำ ผมต้องทำอะไรบ้างครับ
Tag : PHP, HTML/CSS, JavaScript, Ajax

|
|
 |
 |
 |
 |
Date :
2014-08-29 02:22:18 |
By :
coolkidz |
View :
825 |
Reply :
2 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ปิดใช้ครับ $config['enable_query_strings'] = TRUE; คือเปิดใช้ ? เสมอ ซึ่งไม่จำเป็นเลย
ถ้าคุณใช้ Codeigniter ตัวใหม่ตั้งแต่ 2.0ขึ้นไป คุณสามารถรับส่งค่าผ่าน ?querystring=val ได้ทันทีอยู่แล้วโดยไม่ต้องปรับอะไรเลย (ตัว 1.x มันงี่เง่า ไม่ยอมให้ใช้)
|
 |
 |
 |
 |
Date :
2014-08-29 16:47:16 |
By :
mr.v |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
อ่อ โอเคร ครับขอบคุณครับ mr.v
|
 |
 |
 |
 |
Date :
2014-08-29 21:01:10 |
By :
coolkidz |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 02
|