略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: ifx_create_char

2024-12-21

ifx_create_char

(PHP 4, PHP 5 < 5.2.1)

ifx_create_charCreates an char object

说明

ifx_create_char ( string $param ) : int

Creates an char object.

参数

param

The char content.

返回值

Returns the new char object id, or FALSE on errors.

参见

add a note add a note

User Contributed Notes 1 note

up
0
evandrosimenes at gmail dot com
8 years ago
Example of ifx_create_char use:
i'd a problem with textarea content, the informix server was returning the -282 error code: Found a quote for which there is no matching quote...

This was the solution for me...i hope it can help someone else having this problem:

<?php
$textarea
= $_POST[textarea];
$char = ifx_create_char($textarea);
$txt[] = $char;
$query = 'INSERT INTO <table> (id, title, status, content) VALUES (0,"'.$title.'","'.$status.'",?)';
if (!(
$execute = ifx_query($query,$conn_id,$txt))){
   echo
"Error on insert...".ifx_error();
} else {
   echo
"<script>alert('Success');</script>";   
}
?>

官方地址:https://www.php.net/manual/en/function.ifx-create-char.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3