shp_close() - closing a shapefile ::
shp_close() closes a shapefile previously created or opened. The handle given to shp_close() is invalid after successfully closing the file(s), and must not be used in subsequent ext_shapelib calls
$res = shp_close($shpresource);