To get rid of the forward Slashes (/) included before every single (') or double quote(") in PHP hosting. Edit the php.ini file and add the following line,
magic_quotes_gpc = Off;
If your PHP code works fine on a Windows system does not guarantee that it will also work on Linux or vice-versa. There are loads of issues that may come up when deploying your PHP code on a Linux environment, such as case-sensitivity issues and single quotes, double quotes, slash issues, etc. These issues can be resolved using the PHP configuration file i.e. php.ini file.
About PHP Magic Quotes
PHP magic quotes when ON all the single quotes (') , double quotes ("), backslashes (\), and NULL characters are escaped with a backslash automatically
PHP Magic quotes directives :
magic_quotes_gpc :If ON it affects HTTP GET, POST and COOKIE Request data.
magic_quotes_runtime: Though by default it's OFF but when this directive is ON, most functions that return data from an external source, including databases and text files, will have quotes escaped with a backslash. This can be set at runtime.
magic_quotes_sybase: If this directive is ON, a single-quote is escaped with a single-quote instead of a backslash.
Note: Magic Quotes have been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0.
Have Questions? Post them here!
- PHP drag and drop file upload tutorial using dropzone.js
- Copy file from one directory to other in Php
- PHP Base64 encoding decoding a variable
- macOS - cannot calculate MAC address: Using fd 9 hv_vm_create HV_ERROR [PHP XAMPP]
- Upload Pdf file using PHP Script
- Call PHP function on Button click using jquery ajax
- PHP Code for sending Emails
- PHP header location function not called
- Delete file using PHP code : unlink()
- PHP Warning: Cannot modify header information - headers already sent
- Failed to load resource: net::ERR_CACHE_MISS PHP
- Upload docx file using PHP script
- PHP 301 Redirect Permanently
- PHP Script to Upload Images to Server
- Installing vue.js in Laravel 8
- Remove URL Forward Slash Before Single or Double quotes in php.ini
- How to destroy PHP session()
- PHP Fatal error : Call to a member function bind_param() on a non-object
- 403 forbidden error for Image
- Microsoft 365 Excel - PRO TIP Discover insights quickly with Power BI, which is already included in your Microsoft services, See it in action - Microsoft
- MacoOS - xyz is an app downloaded from the internet. Are you sure you want to open it? Alert - MacOS
- zsh: exec format error eclipse M1 Mac - zsh
- Eclipse version 32-bit or 64-bit check on macOS - Eclipse
- Change Mouse Scrolling in Mac OS X - Mac-OS-X
- How to remove or uninstall Java from Ubuntu using apt-get - Linux
- Be right back Weβre making updates to the Apple Store. Check back soon. - Apple
- Execute .bin and .run file Ubuntu Linux - Linux