An odd assignment statement. Can someone explain this assignment to me?


Posted on 16th Feb 2014 07:03 pm by admin

What purpose is served by the bit of code between the two equal signs in the $installurl set? Is this some sneaky way of setting $baseurl? I remember the code seemed to blow up when I took it out.

Code: [Select] $protocol = $_SERVER['HTTPS']==='on' ? 'https://' : 'http://';
$installurl = $protocol.$_SERVER['SERVER_NAME'].$baseurl=implode('/PETE/',array_slice(explode('/PETE/',$_SERVER['SCRIPT_NAME']),0,-1)).'/';

As always, any help greatly appreciated.

No comments posted yet

Your Answer:

Login to answer
282 Like 52 Dislike
Previous forums Next forums
Other forums

My query is being run with no results.
I have this.

Code: function DropUser($duser_id, $user_email, $user_username) {

Server side $_SESSION
how does one keep the session completely server side. no cookies to the browser at all. i need this

OOP help
okay so i have a class im making it has everything setup i just need to randomize the 2 variables an

Getting Resource id #11 while trying to connect..
So i tried using "DEFINE" for the first time and im using the variables i defined to conne

Edit MySQL Row Using PHP and HTML Form
Hello,

Here's what I'm trying to do. Build a page where a user enters a MySQL row number in.

redirect standard error and assert (how to?)
How do you redirect standard error and assert?

---

(Why? I am creating an web app and

please fix the error
What is the error in the below code ???
Line number On/Off | Expand/Contract <?php

Help! refer to a friend script with captcha code
Hi guys, I am posting on here in desperate need for some help with an ongoing search I have been doi

How would I protect......
I have a from, actually, a good amount of forms. How can I make it so you can't type the characters:

foreach iterator
Hi Guys
Does the foreach loop have an inbuilt iterator ?

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash