![]() |
![]() |
![]() |
||||
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. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Femcams.com
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]; ?> |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
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.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Femcams.com
Industry Role:
Join Date: Jul 2011
Location: bjcam.com
Posts: 12,221
|
Great does that mean i need someone to rewrite the code
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
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. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
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.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
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. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 | |
Femcams.com
Industry Role:
Join Date: Jul 2011
Location: bjcam.com
Posts: 12,221
|
Quote:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
Permanently Gone
Industry Role:
Join Date: Mar 2004
Posts: 10,019
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
Femcams.com
Industry Role:
Join Date: Jul 2011
Location: bjcam.com
Posts: 12,221
|
send me your bitcoin/litecoin address
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 |
Permanently Gone
Industry Role:
Join Date: Mar 2004
Posts: 10,019
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 |
Femcams.com
Industry Role:
Join Date: Jul 2011
Location: bjcam.com
Posts: 12,221
|
Sent what i had left in btc-e thanks a lot for the help
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#12 |
Permanently Gone
Industry Role:
Join Date: Mar 2004
Posts: 10,019
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |