Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 04-24-2013, 08:06 AM   #1
AllAboutCams
Femcams.com
 
AllAboutCams's Avatar
 
Industry Role:
Join Date: Jul 2011
Location: bjcam.com
Posts: 12,221
Any idea what Deprecated: Function split() is deprecated in means

im getting error
Deprecated: Function split() is deprecated in

in this code

<?php

$fcontents = join ('', file ($_SERVER['DOCUMENT_ROOT'] . '/banners/banners_468_60.txt'));
$s_con = split("~",$fcontents);

$banner_no = rand(0,(count($s_con)-1));
echo $s_con[$banner_no];
?>
AllAboutCams is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-24-2013, 08:08 AM   #2
edgeprod
Permanently Gone
 
Industry Role:
Join Date: Mar 2004
Posts: 10,019
The function split() was deprecated as of PHP 5.3.0 .. its use is not suggested.
edgeprod is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-24-2013, 08:11 AM   #3
AllAboutCams
Femcams.com
 
AllAboutCams's Avatar
 
Industry Role:
Join Date: Jul 2011
Location: bjcam.com
Posts: 12,221
Quote:
Originally Posted by edgeprod View Post
The function split() was deprecated as of PHP 5.3.0 .. its use is not suggested.
Great does that mean i need someone to rewrite the code
AllAboutCams is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-24-2013, 08:11 AM   #4
edgeprod
Permanently Gone
 
Industry Role:
Join Date: Mar 2004
Posts: 10,019
Sorry, I didn't look who posted this, I know you'll need a bit more handholding:

Your PHP is configured with E_DEPRECATED, which shows warnings for functions that are suggested to no longer be used. This isn't an appropriate setting for a production server, and whoever configured your site/server didn't do it correctly .. a production server bitching about coding standards isn't ideal.

If you don't need regular expressions in your split (which it looks like you don't), use explode(). If you do need them, use preg_split(). I'd go with explode() in this case.
edgeprod is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-24-2013, 08:13 AM   #5
notjoe
Confirmed User
 
Industry Role:
Join Date: May 2002
Location: Toronto, Canada
Posts: 5,599
Don't use that function. If it is depreciated now it is only a matter of time before it is removed from php and will not exist.
notjoe is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-24-2013, 08:13 AM   #6
edgeprod
Permanently Gone
 
Industry Role:
Join Date: Mar 2004
Posts: 10,019
Interestingly, join() isn't common usage. implode() is more common, at least for me, which implies that it is the opposite of explode(), versus the opposite of split() -- which it is NOT.

join() is just an alias for implode() .. so if you use implode(), it's more clear to use explode() to take it apart.
edgeprod is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-24-2013, 08:19 AM   #7
AllAboutCams
Femcams.com
 
AllAboutCams's Avatar
 
Industry Role:
Join Date: Jul 2011
Location: bjcam.com
Posts: 12,221
Quote:
Originally Posted by edgeprod View Post
Sorry, I didn't look who posted this, I know you'll need a bit more handholding:

Your PHP is configured with E_DEPRECATED, which shows warnings for functions that are suggested to no longer be used. This isn't an appropriate setting for a production server, and whoever configured your site/server didn't do it correctly .. a production server bitching about coding standards isn't ideal.

If you don't need regular expressions in your split (which it looks like you don't), use explode(). If you do need them, use preg_split(). I'd go with explode() in this case.
Thank you explode worked great
AllAboutCams is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-24-2013, 08:20 AM   #8
edgeprod
Permanently Gone
 
Industry Role:
Join Date: Mar 2004
Posts: 10,019
Quote:
Originally Posted by AllAboutCams View Post
Thank you explode worked great
Sure. Bitcoin tips accepted.
edgeprod is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-24-2013, 08:27 AM   #9
AllAboutCams
Femcams.com
 
AllAboutCams's Avatar
 
Industry Role:
Join Date: Jul 2011
Location: bjcam.com
Posts: 12,221
Quote:
Originally Posted by edgeprod View Post
Sure. Bitcoin tips accepted.
send me your bitcoin/litecoin address
AllAboutCams is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-24-2013, 08:32 AM   #10
edgeprod
Permanently Gone
 
Industry Role:
Join Date: Mar 2004
Posts: 10,019
Quote:
Originally Posted by AllAboutCams View Post
send me your bitcoin/litecoin address
Primary tipping address is: 1BLgmNjaQadASUADbTYGJKvmtqX9iniHqn

edgeprod is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-24-2013, 09:27 AM   #11
AllAboutCams
Femcams.com
 
AllAboutCams's Avatar
 
Industry Role:
Join Date: Jul 2011
Location: bjcam.com
Posts: 12,221
Quote:
Originally Posted by edgeprod View Post
Primary tipping address is: 1BLgmNjaQadASUADbTYGJKvmtqX9iniHqn

Sent what i had left in btc-e thanks a lot for the help
AllAboutCams is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-24-2013, 10:05 AM   #12
edgeprod
Permanently Gone
 
Industry Role:
Join Date: Mar 2004
Posts: 10,019
Quote:
Originally Posted by AllAboutCams View Post
Sent what i had left in btc-e thanks a lot for the help
Appreciated, and you're welcome.
edgeprod is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.