Tampilkan postingan dengan label php. Tampilkan semua postingan
Tampilkan postingan dengan label php. Tampilkan semua postingan

Handle special character ' in laravel blade template

 

You can escape quote characters with addslashes()

<button id="submit_btn" onclick="submitData('{{addslashes($data)}}')">Save Data</bu

 

 https://stackoverflow.com/questions/54093308/handle-special-character-in-laravel-blade-template

How do I silence PHP errors on Linux Ubuntu Lampp?


<b>Notice</b>:  Undefined index: consid in <b>/media/data1/lampp/htdocs/bridgingbpjs/index.php</b> on line <b>82</b><br />

How do I silence PHP errors on Linux Ubuntu Lampp?

1.

go to /lampp/etc/php.ini

2.

Find this text
display_errors=On

and then set it off
display_errors=Off

3. 

Resart Lampp
sudo /opt/lampp/share/xampp-control-panel/xampp-control-panel

How do I activate the OCI8/Oracle extension for PHP?




    To activate the OCI8/Oracle extension for PHP please execute the following command:

    sudo /opt/lampp/lampp oci8

    The following dialog will start:

    Please enter the path to your Oracle or Instant Client installation:

              [/opt/lampp/lib/instantclient-11.2.0.3.0]

              installing symlinks...

              patching php.ini...

              OCI8 add-on activation likely successful.

              LAMPP: Stopping Apache with SSL...

              LAMPP: Starting Apache with SSL...

    The extension should now be active.
Done!!!




source : #https://www.apachefriends.org/faq_linux.html




How to catch curl errors in PHP

 

generate curl error after its execution


$url = 'http://example.com';

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
if(curl_errno($ch)){
    echo 'Request Error:' . curl_error($ch);
}


source :#https://stackoverflow.com/questions/3987006/how-to-catch-curl-errors-in-php