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.

282 Like 52 Dislike
Previous php-forum Next php-forum
Other php-forum

parse error
Parse error: syntax error, unexpected '[', expecting ')' in /Users/admin/Sites/phptest/array.php on

Undefined offset
The following script checks to see if the user answer matches the correct answer.

Form Fiel

help connecting a form to php and then emailing the form
Ok. So, I made a form, and I need help to where when submitted, I get an email with the submitted de

Mysql error message
help me find out what this error message means:

"Duplicate entry '0' for key 'PRIMARY'&q

help with email script...
hey

I need help with my mail script

when the form on http://www.mcgdesignstudio.com/c

dinamic "textboxes"?
Ey all, my first post here, i hope its not a hard one

I display mysql results in a table

HTML Form Server Side Validation
Hi, Im new here, im currently doing a website for a friend, and I have designed using snippets from

Get keys and values from an array
Hellow,

I have an array $Data with keys and values. With a foreach I can display all the valu

Required to login help
I'm trying to set up my site so users have to be logged into the forum to access the site.I've been

Function to extract email attachments using PHP IMAP
function extract_attachments($connection, $message_number) {

$attachments = array();

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