简体   繁体   中英

What do I need to consider when developing on the localhost a website with SSL

I'm new to php . currently I'm developing my first website in my life. I'm developing on my personal windows computer with XAMPP . I'm planning to deploy the website on a Linux server with SSL certificate .

While the development stage I always keep in my mind that this code will work on Linux. So I try to consider the differences between the 2 operating systems -according to my limited experience with Linux systems- . for example in my code I replaced

fwrite($handle,"a line of text\r\n");

with

fwrite($handle,"a line of text" . PHP_EOL);

and

$path = "c://xampp/htdocs/index.php";

with

$path = $_SERVER['DOCUMENT_ROOT'] ."index.php";

My question now. Is there any thing I need to consider about SSL certificate while developing in this environment ?

Not really no, the SSL certificate is nothing to do with your php coding. The only thing that i can think of that will create a nuisance in your website is linking none secure content. EG a css file called with http instead of https. you can solve that by simply calling scripts images and the like with just // to eliminate the protocol dependency.

By that i mean, //path/to/file or //example.com/path/to/script.js and so on. If calling over ssl any remote host must also support ssl although you will most likely be using a CDN witch generally do support it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM