Help with PHP error required

hai i am fresher to PHP. i got below error please solve it sir please its an emergency sir

i will send Cpanel details

URL::: http://cardial.co.in/wp/

“”“” scandir() expects parameter 2 to be long, string given in/home/cardialco/public_html/wp-content/themes/cardealer/extensions/cardealer/classes/car.php on line720

Warning: Invalid argument supplied for foreach() in/home/cardialco/public_html/wp-content/themes/cardealer/extensions/cardealer/classes/car.php on line722 “”“”"

Hi @Chandu_Thota, and welcome to the forums.

I’ve moved your post into a new thread of its own. (You should always start a new discussion for a new question, not just add it on to an unrelated thread. )

[quote=“Chandu_Thota, post:1, topic:200633”]
i will send Cpanel details
[/quote]Please don’t - not now, and not ever. Sharing your details with a stranger on the Internet is a really, really unwise thing to do.

I would guess your foreach error is generated from your scandir() error.

You will need to post the code for line 720 and probably some code before and after.

Wild guess. From

http://php.net/manual/en/function.scandir.php

array scandir ( string $directory [, int $sorting_order = SCANDIR_SORT_ASCENDING [, resource $context ]] )

I’m thinking you put the CONSTANT inside quotes making it a string. eg.

correct

$dir_contents = scandir('somefolder', SCANDIR_SORT_DESCENDING);

wrong

$dir_contents = scandir('somefolder', 'SCANDIR_SORT_DESCENDING');